28.07.2012, 15:26
pawn Код:
#include <a_samp>
#include <zcmd>
new OldName[128];
new i =0;
public OnPlayerDisconnect(playerid)
{
if( i == 1 )
{
SetPlayerName(playerid, OldName);
}
return 1;
}
CMD:name(playerid, params[])
{
GetPlayerName(playerid, OldName, sizeof(OldName));
SetPlayerName(playerid, "Wolf");
SendClientMessage(playerid, -1, "Your name was setted to Wolf");
i=1;
return 1;
}
CMD:restorename(playerid, params[])
{
SetPlayerName(playerid, OldName);
new String[128];
format(String, sizeof(String), "Your name was restored to %s", OldName);
SendClientMessage(playerid, -1, String);
i=0;
return 1;
}