29.12.2011, 22:14
Quote:
OMFG then every play would change another player name without being admin duuuuuuuuuh
Mastermids those days No he want it for admins only as Normal people do. |
pawn Код:
CMD:changename(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You are not an admin!");
new pID, pOldName[MAX_PLAYER_NAME], pNewName[MAX_PLAYER_NAME], string[128];
if(sscanf(params, "us[24]", pID, pNewName)) return SendClientMessage(playerid,-1, "Usage: /changename ID NewName");
GetPlayerName(pID,pOldName,sizeof(pOldName));
SetPlayerName(pID,pNewName);
format(string, sizeof(string), "You have set %s(%d) name to: %s", pOldName, pID, pNewName);
SendClientMessage(playerid, -1, string);
return 1;
}