10.02.2015, 00:51
(
Последний раз редактировалось Jimmmy; 10.02.2015 в 01:29.
)
Estude mais sobre variavel, vocк tinha feito todas elas errada .
Agora pode compilar sem poblemas .
Agora pode compilar sem poblemas .
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new Text:Textdraw[7][MAX_PLAYERS]; // se tiver 6 Variavel aqui entгo sera 7 ! .
public OnFilterScriptInit()
{
SetTimer("UpdateTimer", 1000, true);
for(new i=0; i<GetMaxPlayers(); i++)
{
Textdraw[0][i] = TextDrawCreate(641.375000, 429.666687, "usebox"); //OBS: Textdraw[0] e Nгo Textdraw0 Entendeu ?
TextDrawLetterSize(Textdraw[0][i], 0.000000, 1.822222);
TextDrawTextSize(Textdraw[0][i], -2.000000, 0.000000);
TextDrawAlignment(Textdraw[0][i], 1);
TextDrawColor(Textdraw[0][i], 0);
TextDrawUseBox(Textdraw[0][i], true);
TextDrawBoxColor(Textdraw[0][i], 102);
TextDrawSetShadow(Textdraw[0][i], 0);
TextDrawSetOutline(Textdraw[0][i], 0);
TextDrawFont(Textdraw[0][i], 0);
Textdraw[1][i] = TextDrawCreate(4.375000, 429.916687, "SCORE:");
TextDrawLetterSize(Textdraw[1][i], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[1][i], 1);
TextDrawColor(Textdraw[1][i], -2139062017);
TextDrawSetShadow(Textdraw[1][i], 0);
TextDrawSetOutline(Textdraw[1][i], 1);
TextDrawBackgroundColor(Textdraw[1][i], 51);
TextDrawFont(Textdraw[1][i], 3);
TextDrawSetProportional(Textdraw[1][i], 1);
Textdraw[2][i] = TextDrawCreate(110.000000, 430.500030, "DINHEIRO:");
TextDrawLetterSize(Textdraw[2][i], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[2][i], 1);
TextDrawColor(Textdraw[2][i], -2139062017);
TextDrawSetShadow(Textdraw[2][i], 0);
TextDrawSetOutline(Textdraw[2][i], 1);
TextDrawBackgroundColor(Textdraw[2][i], 51);
TextDrawFont(Textdraw[2][i], 3);
TextDrawSetProportional(Textdraw[2][i], 1);
Textdraw[3][i] = TextDrawCreate(225.625000, 430.499969, "KILLS:");
TextDrawLetterSize(Textdraw[3][i], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[3][i], 1);
TextDrawColor(Textdraw[3][i], -2139062017);
TextDrawSetShadow(Textdraw[3][i], 0);
TextDrawSetOutline(Textdraw[3][i], 1);
TextDrawBackgroundColor(Textdraw[3][i], 51);
TextDrawFont(Textdraw[3][i], 3);
TextDrawSetProportional(Textdraw[3][i], 1);
Textdraw[4][i] = TextDrawCreate(314.375000, 430.500152, "DEATHS:");
TextDrawLetterSize(Textdraw[4][i], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[4][i], 1);
TextDrawColor(Textdraw[4][i], -2139062017);
TextDrawSetShadow(Textdraw[4][i], 0);
TextDrawSetOutline(Textdraw[4][i], 1);
TextDrawBackgroundColor(Textdraw[4][i], 51);
TextDrawFont(Textdraw[4][i], 3);
TextDrawSetProportional(Textdraw[4][i], 1);
Textdraw[5][i] = TextDrawCreate(415.625000, 429.916564, "FPS:");
TextDrawLetterSize(Textdraw[5][i], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[5][i], 1);
TextDrawColor(Textdraw[5][i], -2139062017);
TextDrawSetShadow(Textdraw[5][i], 0);
TextDrawSetOutline(Textdraw[5][i], 1);
TextDrawBackgroundColor(Textdraw[5][i], 51);
TextDrawFont(Textdraw[5][i], 3);
TextDrawSetProportional(Textdraw[5][i], 1);
Textdraw[6][i] = TextDrawCreate(488.125000, 429.333312, "PING:");
TextDrawLetterSize(Textdraw[6][i], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[6][i], 1);
TextDrawColor(Textdraw[6][i], -2139062017);
TextDrawSetShadow(Textdraw[6][i], 0);
TextDrawSetOutline(Textdraw[6][i], 1);
TextDrawBackgroundColor(Textdraw[6][i], 51);
TextDrawFont(Textdraw[6][i], 3);
TextDrawSetProportional(Textdraw[6][i], 1);
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
for(new i = 0; i < 7; i++) TextDrawHideForPlayer(playerid, Textdraw[i][playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
for(new i = 0; i < 7; i++) TextDrawShowForPlayer(playerid, Textdraw[i][playerid]);
return 1;
}
forward UpdateTimer(); //Must always forward a timer, read the set timer topic in the wiki for more info.
public UpdateTimer() // Must be a public.
{
for(new x; x<MAX_PLAYERS; x++) // Loop for all players
{
new TDstring[128],Score,Money,Ping;
if(!IsPlayerConnected(x)){
Score = GetPlayerScore(x), Money = GetPlayerMoney(x), Ping = GetPlayerPing(x);
format(TDstring, sizeof(TDstring), "SCORE %d, DINHEIRO %d, KILLS %d, DEATHS %d, FPS %d, PING %d", Score, Money, Ping);
TextDrawSetString(Textdraw[0][x], TDstring);
}
}
return 1;
}
#endif