[HELP] What is wrong with THIS command?
#1

Hey, i made my own command, i really need to make this command work... WHen i type /givegatekey then nothing happens, it wont say even "Player is not near you" or anything..

pawn Код:
if(strcmp(cmd, "/givegatekey", true) == 0)
    {
      giveplayerid = ReturnUser(tmp);
      if(IsPlayerConnected(giveplayerid))
        {
        if(PlayerInfo[playerid][pLeader] == 5)
            {
          if(giveplayerid != INVALID_PLAYER_ID)
                {
            new Float:x, Float:y, Float:z;
            GetPlayerPos(giveplayerid,x,y,z);
            if(!PlayerToPoint(15, playerid, x, y, z))
                    {
              SendClientMessage(playerid, COLOR_GRAD1, " Player is not near you!");
              return 1;
            }
            if(PlayerInfo[giveplayerid][pGatekey1] == 1)
                    {
              SendClientMessage(playerid, COLOR_GRAD1, " Player already haves your gate key!");
              return 1;
            }
            PlayerInfo[giveplayerid][pGatekey1] = 1;
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s takes hes gates remote controller, and gives it to %s.", sendername ,giveplayer);
            ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
          }
            }
        else if(PlayerInfo[playerid][pLeader] == 9)
            {
          if(giveplayerid != INVALID_PLAYER_ID)
                {
            new Float:x, Float:y, Float:z;
            GetPlayerPos(giveplayerid,x,y,z);
            if(!PlayerToPoint(15, playerid, x, y, z))
                    {
              SendClientMessage(playerid, COLOR_GRAD1, " Player is not near you!");
              return 1;
            }
            if(PlayerInfo[giveplayerid][pGatekey2] == 1)
                    {
              SendClientMessage(playerid, COLOR_GRAD1, " Player already haves your gate key!");
              return 1;
            }
            PlayerInfo[giveplayerid][pGatekey2] = 1;
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s takes hes gates remote controller, and gives it to %s.", sendername ,giveplayer);
            ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
          }
            }
Reply


Messages In This Thread
[HELP] What is wrong with THIS command? - by Spatman - 09.07.2009, 10:48
Re: [HELP] What is wrong with THIS command? - by Westie - 09.07.2009, 10:50
Re: [HELP] What is wrong with THIS command? - by Spatman - 09.07.2009, 11:32
Re: [HELP] What is wrong with THIS command? - by Spatman - 09.07.2009, 13:19
Re: [HELP] What is wrong with THIS command? - by Spatman - 09.07.2009, 16:30
Re: [HELP] What is wrong with THIS command? - by Correlli - 09.07.2009, 16:47
Re: [HELP] What is wrong with THIS command? - by Spatman - 09.07.2009, 19:41
Re: [HELP] What is wrong with THIS command? - by Westie - 10.07.2009, 23:02
Re: [HELP] What is wrong with THIS command? - by Spatman - 10.07.2009, 23:10

Forum Jump:


Users browsing this thread: 1 Guest(s)