26.09.2011, 16:51
Tenta assim.
PHP код:
new Text:Coisa[MAX_PLAYERS];
public OnFilterScriptInit()
{
SetTimer("Killstreak", 5000, true);
for(new i = 0; i< MAX_PLAYERS ; i++)
{
Coisa[i] = TextDrawCreate(160.000000, 360.000000, "__");
TextDrawBackgroundColor(Coisa, 255);
TextDrawFont(Coisa[i], 1);
TextDrawLetterSize(Coisa[i], 0.300000, 1.000000);
TextDrawColor(Coisa[i], -1);
TextDrawSetOutline(Coisa[i], 1);
TextDrawSetProportional(Coisa[i], 1);
TextDrawUseBox(Coisa[i], 0);
TextDrawBoxColor(Coisa[i], 255);
TextDrawTextSize(Coisa[i], 620.000000, 0.000000);
TextDrawShowForPlayer(playerid, Coisa[i]);
}
return true;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Coisa[playerid]);
return true;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Coisa[playerid]);
TextDrawDestroy(Coisa[playerid]);
return true;
}
forward Killstreak();
public Killstreak()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
new str[128];
new lvl2;
new lvl = (pDataInfo[playerid][Matou]+pDataInfo[playerid][Kills]-lvl2/5)/5;
if(lvl < 0)
{
lvl2=0;
}
else lvl2=lvl;
format(str, 128, "~w~Info /score /vip : ~n~~g~Matou: ~w~%d ~n~~g~Morreu: ~w~%d ~n~~y~Respeito: ~w~%d ~n~~b~Score: ~w~%d" , pDataInfo[playerid][Matou]+ pDataInfo[playerid][Kills], pDataInfo[playerid][Morreu]+ pDataInfo[playerid][Deaths], pDataInfo[playerid][Matou]+ pDataInfo[playerid][Kills]-(5*lvl2), lvl2);
TextDrawSetString(Text:Coisa[playerid], str);
return true;
}
return true;
}
return true;
}