02.02.2019, 10:27
Quote:
Код:
CMD:m(playerid,params[]) { new text[128],carid = GetPlayerVehicleID(playerid); for(new tt = 0; tt < sizeof police_vehicles; tt++) if(gTeam[playerid] == Police && carid == police_vehicles[tt]) { if(sscanf(params,"s[128]",text)) { SendClientMessage(playerid,white,"Usage: /m [text]"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { new Float:tx,Float:ty,Float:tz; GetPlayerPos(i,tx,ty,tz); new Float: pdistance = GetPlayerDistanceFromPoint(i,tx,ty,tz); if(IsPlayerConnected(i)) if(pdistance < 8.0) { SendClientMessage(i, white, text); } } } else { return SendClientMessage(playerid,white,"You must be on Police Duty and sit in Police Vehicle"); } return 1; } |