08.04.2012, 08:08
sorry for my bad english, but i have a problem.
i made this command, /makeleader, but i cant use it myself. I want to test it on myself, but it says "Invalid playerid"
Can anyone redo it so i can use this command on myself too?
i made this command, /makeleader, but i cant use it myself. I want to test it on myself, but it says "Invalid playerid"
Can anyone redo it so i can use this command on myself too?
pawn Код:
CMD:makeleader(playerid,params[])
{
new id,fraks,string[186];
//if(PlayerInfo[playerid][pAdmin] >= 1337)
if(sscanf(params,"ui",id,fraks)) return SendClientMessage(playerid,0x00FF00FF,"Kasutus: /paneliidriks <mдngijaid> <fraksid>"); //usage: /makeleader <playerid><fractionid>
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0x00FF00FF,"Selline mдngija puudub."); // Invalid playerid
format(string,sizeof(string), "Sa panid mдngija %s number %d fraktsiooni liidriks.", id, fraks); // You made player %s to number %d fraction leader
SendClientMessage(playerid, -1, string);
PlayerInfo[id][pLiider] = fraks;
return 1;
}