07.10.2010, 14:32
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:
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;
}