20.04.2014, 00:29
Topo do GM
vocк tera que ter a include Foreach no Pawno .
ai vocк poem no topo do Gm
#include <Foreach>
em OnGameModeInit
final do Gm
vocк tera que ter a include Foreach no Pawno .
ai vocк poem no topo do Gm
#include <Foreach>
PHP код:
new Text:CNN[MAX_PLAYERS];
PHP код:
forward ApagarTexto(playerid);
PHP код:
for(new i=0; i<GetMaxPlayers(); i++)
{
CNN[i] = TextDrawCreate(35.000000, 152.000000, " ");
TextDrawBackgroundColor(CNN[i], 255);
TextDrawFont(CNN[i], 1);
TextDrawLetterSize(CNN[i], 0.310000, 1.000000);
TextDrawColor(CNN[i], -1);
TextDrawSetOutline(CNN[i], 1);
TextDrawSetProportional(CNN[i], 1);
}
PHP код:
if(strcmp(cmd, "/cnn", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
strmid(tmp, cmdtext, 4, strlen(cmdtext));
if(!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, " | ERRO | Use /cnn [Texto] .");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
format(string, sizeof(string), "~g~~h~%s ~p~ (%d): ~w~%s",aname, i,tmp);
TextDrawSetString(CNN[i], string);
TextDrawShowForPlayer(i, CNN[i]);
SetTimerEx("ApagarTexto",5000,false,"i",i);
}
return 1;
}
PHP код:
public ApagarTexto()
{
foreach(Player,i)
{
TextDrawHideForPlayer(i, CNN[i]);
}
return 1;
}