Cara que cуdigo embolado..
PHP код:
CMD:tv(playerid,params[])
{
if(TV[playerid] == false)
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"Uso: /tv [ID]");
new TvNome[24];
GetPlayerName(id, TvNome, 24);
new STR[45];
format(STR, sizeof(STR), "~b~Nome~w~ : ~y~%s", TvNome);
PlayerTextDrawSetString(playerid, TV_SPEC[1][playerid], STR);
GameTextForPlayer(playerid, "~w~ TV~n~~r~ On", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, id);
for(new i = 0; i < 5; i++) PlayerTextDrawShow(playerid, TV_SPEC[i][playerid]);
new string[15];
format(string, sizeof(string), "Vocк Esta De TV Em {00BFFF}(%s)", TvNome);
SendClientMessage(playerid, -1, string);
TV[playerid] = true;
} else {
TogglePlayerSpectating(playerid, 0);
GameTextForPlayer(playerid, "~w~ TV~n~~r~ Off", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
for(new i = 0; i < 5; i++) PlayerTextDrawHide(playerid, TV_SPEC[i][playerid]);
GameTextForPlayer(playerid,"TV:~r~OFF",2000,6);
TV[playerid] = false;
}
return 1;
}