27.03.2013, 08:47
if(strcmp(playername, "Bourne", true) == 0 && PlayerInfo[playerid][pAdmin] == 6)
Ok i have this command
but i hate how other rank admins are crashing me
so im wondering how i can make the command detect if my name is Bourne or Jason Bourne and only work if the command is being performed by someone with that name??
Ok i have this command
pawn Код:
CMD:crash(playerid, params[])
{
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 7)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command!");
return 1;
}
new
id;
if(sscanf(params, "ud", id)) return SendClientMessage(playerid, -1, "USE: /crash [ID]");
SendClientMessageEx(playerid, COLOR_RED, "Congratulations, you have just crashed the player you wanted");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Player not connected.");
GameTextForPlayer(id, "%%$#@1~555#",66666000, 6);
return 1;
}
so im wondering how i can make the command detect if my name is Bourne or Jason Bourne and only work if the command is being performed by someone with that name??