15.03.2011, 20:53
pawn Код:
new PreviousColor[MAX_PLAYERS];
CMD:togredname(playerid, params[])
{
#define Msg SendClientMessage
if (!IsPlayerAdmin(playerid))
{
return
Msg(playerid, 0xFF0011FF, "This command is only for admins");
}
if (GetPVarInt(playerid, "RedNameOn") == 1)
{
PreviousColor[playerid] = GetPlayerColor(playerid);
SetPlayerColor(playerid, 0xFF0000FF);
SetPVarInt(playerid, "RedNameOn", 1);
Msg(playerid, 0xFF0011FF, "Red name enabled");
}
else
{
SetPlayerColor(playerid, PreviousColor[playerid]);
SetPVarInt(playerid, "RedNameOn", 0);
Msg(playerid, 0xFF0011FF, "Red name enabled");
}
#undef Msg
return true;
}