Jump to content
  • 0

dece nu o pot compila ca fs?


fbi

Question

dece nu o pot compila ca fs? imi da dont send

prima mea comanda:)

                                       

new cmd_giveweapon[] = "/giveweapon";

cmd_giveweapon(playerid,params[])

{

if(IsPlayerMod(playerid,"giveweapon"))

SendClientMessage(playerid,COLOR_RED,"You must be a Moderator or higher to usee this Command");

{

new

lookupid = NameLookup(param,playerid);

if(!param[0])

}

else if(lookupid !=INVALID_PLAYER_ID)

    {

        SendClientMessage(playerid,COLOR_RED,"You cannot give a weapon to a nonexistent or disconnected player!");

}

{

new

weaponid =

}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Pai are multe erori

1. la ultimu la new nu e numic si nici la weaponid =

2.Da dont send cand nu ai incheat ceva adic nai pus destule }

trebuie puse 2 } la urma

Ceva de genu

new cmd_giveweapon[] = "/giveweapon";

cmd_giveweapon(playerid,params[])

{

  if(IsPlayerMod(playerid,"giveweapon"))

  SendClientMessage(playerid,COLOR_RED,"You must be a Moderator or higher to usee this Command");

      {

      new

      lookupid = NameLookup(param,playerid);

      if(!param[0])

      }

  else if(lookupid !=INVALID_PLAYER_ID)

      {

          SendClientMessage(playerid,COLOR_RED,"You cannot give a weapon to a nonexistent or disconnected player!");

      }

      {

      new weaponid;

      weaponid = GetPlayerWeapon(playerid);

      }

}

dar nu stiu ce cauta NEW-urile astea la sfarsit poate nai copiat tot ce era

Link to comment
Share on other sites

  • 0

new cmd[256],idx;

cmd = strtok(cmdtext, idx);

if(strcmp(cmd, "/veh", true) == 0)

{

    new string[50];

    tmp = strtok(cmdtext, idx);

    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR, "USAGE: /veh [carid] [color1] [color2]");

    new car;

    car = strval(tmp);

    if(car < 400 || car > 611) return SendClientMessage(playerid, RED, "Vehicle id can't be below 400 nor above 611");

    tmp = strtok(cmdtext, idx);

    if(!strlen(tmp)) return SendClientMessage(playerid, ORANGE, "USAGE: /veh [carid] [color1] [color2]");

    new color1;

    color1 = strval(tmp);

    if(color1 < 0 || color1 > 126) return SendClientMessage(playerid, RED, "Color ID can't be below 0 nor above 126 !");

    tmp = strtok(cmdtext, idx);

    if(!strlen(tmp)) return SendClientMessage(playerid, ORANGE, "USAGE: /veh [carid] [color1] [color2]");

    new color2;

    color2 = strval(tmp);

    if(color2 < 0 || color2 > 126) return SendClientMessage(playerid, RED, "Color ID can't be below 0 nor above 126 !");

    new Float:X,Float:Y,Float:Z,Float:A;

    GetPlayerPos(playerid, X,Y,Z);

    GetPlayerFacingAngle(playerid,A);

    new carid = CreateVehicle(car, X,Y,Z, A, color1, color2, 6000);

    LinkVehicleToInterior(carid,GetPlayerInterior(playerid));

    SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));

    format(string, sizeof(string), "Vehicle ID %d spawned.", carid);

    SendClientMessage(playerid, GREEN, string);

    return 1;

}

asta e buna?
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.