19.03.2013, 14:32
(
Последний раз редактировалось Ananisiki; 15.12.2013 в 18:21.
)
^^^^^^^^
CMD:highlight(playerid,params[])
{
new playername[MAX_PLAYERS];
if(!IsCnRAdmin(playerid))
return UnknownCMD(playerid);
if(!strlen(params))
return SendClientMessage(playerid, COLOR_RED, "USAGE: /highlight [PlayerID]");
new string[128];
playerid = strval(params);
if(IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, playername, sizeof(playername));
if(AccInfo[playerid][blip] == 0)
{
AdminCMD(playerid, "HIGHLIGHT");
AccInfo[playerid][pColour] = GetPlayerColor(player1);
AccInfo[playerid][blip] = 1;
BlipTimer[player1] = SetTimerEx("HighLight", 1000, 1, "i", player1);
format(string,sizeof(string),"|- You have Highlighted %s's marker -|", PlayerName);
}
else
{
KillTimer( BlipTimer[playerid]);
AccInfo[playerid][blip] = 0;
SetPlayerColor(player1, AccInfo[player1][pColour]);
format(string,sizeof(string),"|- You have Stopped Highlighting %s's marker -|", PlayerName);
}
}
else return SendClientMessage(playerid,yellow,string);
return 1;
}