Bem eu achei este FS no ****** mas tem coisas erradas nele e eu queria que me ajudassem a por elas diretas para ver se dб direitinho no server. Jб tentei e nгo dб. Agradeзo a vossa ajuda e dou +rep a quem ajudar.
Код:
// These textdraws has been generated using iPLEOMAX's TextDraw Editor.
// Thank you for using this tool!
#include <a_samp>
//Global Textdraws:
new Text:Textdraw0 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw1 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw2 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw3 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw4 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw5 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw6 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw7 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw8 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw9 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw10 = Text:INVALID_TEXT_DRAW;
new Text:Textdraw11 = Text:INVALID_TEXT_DRAW;
public OnFilterScriptInit() //or OnGameModeInit()
{
Textdraw0 = TextDrawCreate(119.597, 141.500, "box");
TextDrawLetterSize(Textdraw0, 0.000, 20.941);
TextDrawTextSize(Textdraw0, 1.279, 0.000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, 0);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 102);
TextDrawFont(Textdraw0, 0);
Textdraw1 = TextDrawCreate(7.495, 130.082, "Project-Tuga");
TextDrawLetterSize(Textdraw1, 0.449, 1.600);
TextDrawAlignment(Textdraw1, 1);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawBackgroundColor(Textdraw1, 51);
TextDrawFont(Textdraw1, 3);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(4.684, 150.500, "Nick:");
TextDrawLetterSize(Textdraw2, 0.388, 1.325);
TextDrawAlignment(Textdraw2, 1);
TextDrawColor(Textdraw2, -13303553);
TextDrawSetOutline(Textdraw2, 1);
TextDrawBackgroundColor(Textdraw2, 51);
TextDrawFont(Textdraw2, 3);
TextDrawSetProportional(Textdraw2, 1);
Textdraw3 = TextDrawCreate(5.152, 169.166, "Skin:");
TextDrawLetterSize(Textdraw3, 0.377, 1.314);
TextDrawAlignment(Textdraw3, 1);
TextDrawColor(Textdraw3, -9436929);
TextDrawSetOutline(Textdraw3, 1);
TextDrawBackgroundColor(Textdraw3, 51);
TextDrawFont(Textdraw3, 3);
TextDrawSetProportional(Textdraw3, 1);
Textdraw4 = TextDrawCreate(5.152, 187.250, "Level:");
TextDrawLetterSize(Textdraw4, 0.317, 1.208);
TextDrawAlignment(Textdraw4, 1);
TextDrawColor(Textdraw4, -13303553);
TextDrawSetOutline(Textdraw4, 1);
TextDrawBackgroundColor(Textdraw4, 51);
TextDrawFont(Textdraw4, 3);
Textdraw5 = TextDrawCreate(5.152, 205.332, "EXP:");
TextDrawLetterSize(Textdraw5, 0.388, 1.307);
TextDrawAlignment(Textdraw5, 1);
TextDrawColor(Textdraw5, -9764609);
TextDrawSetOutline(Textdraw5, 1);
TextDrawBackgroundColor(Textdraw5, 51);
TextDrawFont(Textdraw5, 3);
TextDrawSetProportional(Textdraw5, 1);
Textdraw6 = TextDrawCreate(5.152, 222.248, "~w~Kills: ~y~~h~50000");
TextDrawLetterSize(Textdraw6, 0.372, 1.371);
TextDrawAlignment(Textdraw6, 1);
TextDrawColor(Textdraw6, -13303553);
TextDrawSetOutline(Textdraw6, 1);
TextDrawBackgroundColor(Textdraw6, 51);
TextDrawFont(Textdraw6, 3);
TextDrawSetProportional(Textdraw6, 1);
Textdraw7 = TextDrawCreate(5.152, 240.916, "~w~Deaths: ~y~~h~10000");
TextDrawLetterSize(Textdraw7, 0.326, 1.360);
TextDrawAlignment(Textdraw7, 1);
TextDrawColor(Textdraw7, -9174785);
TextDrawSetOutline(Textdraw7, 1);
TextDrawBackgroundColor(Textdraw7, 51);
TextDrawFont(Textdraw7, 3);
TextDrawSetProportional(Textdraw7, 1);
Textdraw8 = TextDrawCreate(5.622, 258.415, "PL:");
TextDrawLetterSize(Textdraw8, 0.414, 1.383);
TextDrawAlignment(Textdraw8, 1);
TextDrawColor(Textdraw8, -13303553);
TextDrawSetOutline(Textdraw8, 1);
TextDrawBackgroundColor(Textdraw8, 51);
TextDrawFont(Textdraw8, 3);
TextDrawSetProportional(Textdraw8, 1);
Textdraw9 = TextDrawCreate(5.622, 276.498, "~w~K/D: ~y~~h~100.0");
TextDrawLetterSize(Textdraw9, 0.352, 1.353);
TextDrawAlignment(Textdraw9, 1);
TextDrawColor(Textdraw9, -8388353);
TextDrawSetOutline(Textdraw9, 1);
TextDrawBackgroundColor(Textdraw9, 51);
TextDrawFont(Textdraw9, 3);
TextDrawSetProportional(Textdraw9, 1);
Textdraw10 = TextDrawCreate(50.131, 323.750, "Project-Tuga");
TextDrawLetterSize(Textdraw10, 0.287, 1.248);
TextDrawAlignment(Textdraw10, 1);
TextDrawColor(Textdraw10, -10878721);
TextDrawSetOutline(Textdraw10, 1);
TextDrawBackgroundColor(Textdraw10, 51);
TextDrawFont(Textdraw10, 3);
TextDrawSetProportional(Textdraw10, 1);
Textdraw11 = TextDrawCreate(5.622, 296.333, "Ping:");
TextDrawLetterSize(Textdraw11, 0.379, 1.371);
TextDrawAlignment(Textdraw11, 1);
TextDrawColor(Textdraw11, -13303553);
TextDrawSetOutline(Textdraw11, 1);
TextDrawBackgroundColor(Textdraw11, 51);
TextDrawFont(Textdraw11, 3);
TextDrawSetProportional(Textdraw11, 1);
return 1;
}
public OnFilterScriptExit() //or OnGameModeExit
{
TextDrawDestroy(Textdraw0);
Textdraw0 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw1);
Textdraw1 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw2);
Textdraw2 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw3);
Textdraw3 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw4);
Textdraw4 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw5);
Textdraw5 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw6);
Textdraw6 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw7);
Textdraw7 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw8);
Textdraw8 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw9);
Textdraw9 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw10);
Textdraw10 = Text:INVALID_TEXT_DRAW;
TextDrawDestroy(Textdraw11);
Textdraw11 = Text:INVALID_TEXT_DRAW;
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawShowForPlayer(playerid, Textdraw11);
SetTimerEx("UpdateText", 1000, false, "i", playerid);
return 1;
}
forward UpdateText(playerid);
public UpdateText(playerid)
{
new PlayerInfo[MAX_PLAYERS][PLAYER_INFO];
new Float:ratio = floatdiv(PlayerInfo[u][Kills],PlayerInfo[u][Deaths])
new pPing[16], pSkin[16];
format(Nick, sizeof(pPing), "%d ms", GetPlayerPing(playerid));
TextDrawSetString(Textdraw11, pPing);
format(pSkin, sizeof(pSkin), "%d", GetPlayerSkin(playerid));
TextDrawSetString(Textdraw8, pSkin);
format(Level, sizeof(pSkin), "%d", GetPlayerSkin(playerid));
TextDrawSetString(Textdraw8, pSkin);
format(EXP, sizeof(pCash), "%d", GetPlayerMoney(playerid));
TextDrawSetString(Textdraw6, pCash);
format(PlayerInfo[u][Kills], sizeof(PlayerInfo[u][Kills]), "~y~~h~%d", PlayerInfo[u][Kills);
TextDrawSetString(Textdraw6, PlayerInfo[u][Kills]);
format(PlayerInfo[u][Deaths], sizeof(PlayerInfo[u][Deaths]), "~y~~h~%d", PlayerInfo[u][Deaths]);
TextDrawSetString(Textdraw6, PlayerInfo[u][Deaths]);
format(pack, sizeof(pack), "~y~~h~%0.2f", GetPlayerPacketloss(playerid));
TextDrawSetString(Textdraw6, pack);
format(ratio, sizeof(ratio), "%d", ratio);
TextDrawSetString(Textdraw6, ratio);
format(pPing, sizeof(pPing), "%d", GetPlayerPing(playerid));
TextDrawSetString(Textdraw6, pPing);
SetTimerEx("UpdateText2", 1000, true, "i", playerid);
return 1;
}
forward UpdateText2(playerid);
public UpdateText2(playerid)
{
new Float:ratio = floatdiv(PlayerInfo[u][Kills],PlayerInfo[u][Deaths])
new pPing[16], pSkin[16];
format(Nick, sizeof(pPing), "%d ms", GetPlayerPing(playerid));
TextDrawSetString(Textdraw11, pPing);
format(pSkin, sizeof(pSkin), "%d", GetPlayerSkin(playerid));
TextDrawSetString(Textdraw8, pSkin);
format(Level, sizeof(pSkin), "%d", GetPlayerSkin(playerid));
TextDrawSetString(Textdraw8, pSkin);
format(EXP, sizeof(pCash), "%d", GetPlayerMoney(playerid));
TextDrawSetString(Textdraw6, pCash);
format(PlayerInfo[u][Kills], sizeof(PlayerInfo[u][Kills]), "~y~~h~%d", PlayerInfo[u][Kills);
TextDrawSetString(Textdraw6, PlayerInfo[u][Kills]);
format(PlayerInfo[u][Deaths], sizeof(PlayerInfo[u][Deaths]), "~y~~h~%d", PlayerInfo[u][Deaths]);
TextDrawSetString(Textdraw6, PlayerInfo[u][Deaths]);
format(pack, sizeof(pack), "~y~~h~%0.2f", GetPlayerPacketloss(playerid));
TextDrawSetString(Textdraw6, pack);
format(ratio, sizeof(ratio), "%d", ratio);
TextDrawSetString(Textdraw6, ratio);
format(pPing, sizeof(pPing), "%d", GetPlayerPing(playerid));
TextDrawSetString(Textdraw6, pPing);
SetTimerEx("UpdateText2", 1000, true, "i", playerid);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
Float:GetPlayerPacketloss( playerid )
{
new pack[ 280 ], pa[ 12 ];
GetPlayerNetworkStats( playerid, pack, 280 );
new packet = strfind( pack, "Packetloss:");
strmid( pa, pack, ( packet + 11 ), 280 );
return floatstr( pa );
}
.
.