05.03.2012, 07:54
pawn Код:
CMD:setname(playerid, params[]);
{
new pName[MAX_PLAYER_NAME]
tmp = strtok(cmdtext, idx);
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[playerid][Admin] >= 3)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setname [ID] [Name]");
return 1;
}
else
{
if(sscanf(params, "ui", giveplayerid, pName))
{
SetPlayerName(giveplayerid, pName);
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are not an Admin!");
return 1;
}
return 1;
}