Problem, function doesn't work.
#1

Whosoever knows how to solve it please comment.
I was working on a /goto command, but seems like it doesn't work, when I type it just send me that I'm not authorized to use that command, even though I'm admin, and logged on RCON feature.
Script:
pawn Код:
if(strcmp(cmd, "/setarmor", true) == 0)
    {

        if(IsPlayerConnected(playerid))
        {
        if (PlayerInfo[playerid][pAdmin] >= 1){return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");}
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setarmor [playerid/PartOfName] [armor]");
            }
            new pID;

  new otherId;
  new GivenName[MAX_PLAYER_NAME];

 

new armouramount;

if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "* Invalid ID!");
    {
      GetPlayerName(pID, GivenName, sizeof(GivenName));
   
  format(string, sizeof(string), "* You have successfully given armour to %s Armour range: %d",GivenName, armouramount);
  SendClientMessage(playerid, COLOR_LIGHTRED, string);

new Float:armour;
GetPlayerArmour(otherId, armour);
{
 SetPlayerArmour(otherId, armouramount);
}




GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You have been given armour by Admin %s Armour range: :%d ", sendername, armouramount);
SendClientMessage(otherId, 0xFF4646FF, string);
}
       

        }
        return 1;
    }
Reply


Messages In This Thread
Problem, function doesn't work. - by Scriptissue - 07.10.2010, 14:32
Re: Problem, function doesn't work. - by NoobScripter1 - 07.10.2010, 14:41
Re: Problem, function doesn't work. - by NoobScripter1 - 07.10.2010, 14:43
Re: Problem, function doesn't work. - by Scriptissue - 07.10.2010, 14:44

Forum Jump:


Users browsing this thread: 1 Guest(s)