Quote:
Originally Posted by DarkScripter
Odeio POG ( Programaзгo Orientada a Gambiarra)
por isto eu reformulei o script, tornando mais rбpido e eficiente.
pawn Код:
#include <a_samp>
new Text:PlayersOnServer;
public OnFilterScriptInit() { print("\n------------------------------------------------------------------"); print(" Show Players who are online by Adsy fixed by: DarkScripter"); print("------------------------------------------------------------------\n"); PlayersOnServer = TextDrawCreate(30,326, #); TextDrawUseBox(PlayersOnServer,0); TextDrawColor(PlayersOnServer,0xFF7100FF); TextDrawBackgroundColor(PlayersOnServer,0x000000AA); TextDrawAlignment(PlayersOnServer, 1); TextDrawSetOutline(PlayersOnServer,1); TextDrawSetShadow(PlayersOnServer,0); return 1; }
public OnFilterScriptExit() { for(new i=0; i<MAX_PLAYERS; i++) { TextDrawHideForPlayer(i, PlayersOnServer); } TextDrawDestroy(PlayersOnServer); return 1; }
public OnPlayerConnect(playerid) { return f_OnPlayerConnect(playerid); }
forward f_OnPlayerConnect(p); public f_OnPlayerConnect(p) { new conected = 0, string[15]; for(new i, e = GetMaxPlayers(); i != e; ++i) { conected += IsPlayerConnected(i); } format(string, sizeof(string), "%i/%i PLAYERS", conected, GetMaxPlayers()); TextDrawSetString(PlayersOnServer, string); TextDrawShowForAll(PlayersOnServer); return 1; }
|
Valeu cara funcionou!!! +REP