25.07.2012, 18:01
Try:
pawn Код:
CMD:duty(playerid) {
if(isnull(params))
return SendClientMessage(playerid, -1, "Type /duty [on/off]");
static
playerName[MAX_PLAYER_NAME];
if(!strcmp(params, "on", true)) {
GetPlayerName(playerid, playerName, sizeof playerName);
SetPVarString(playerid, "name", playerName);
SetPlayerName(playerid, "WOLF");
return 1;
}
if(!strcmp(params, "off", true)) {
if(GetPVarType(playerid, "name")) {
GetPVarString(playerid, "name", playerName, sizeof playerName);
SetPlayerName(playerid, playerName);
return 1;
}
}
return 1;
}