Help please, whats wrong with thic command?
#1

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);
          }
            }
When i type /givegatekey, nothing happens, absolutely nothing happens... I dont see any problem in the command, im getting confused... Please help.
Reply
#2

Posted before: http://forum.sa-mp.com/index.php?top...5032#msg685032
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)