#include <a_samp>new Text:Textdraw32;public OnFilterScriptInit(){Textdraw32 = TextDrawCreate(492.000000, 4.000000, \"15/30\");TextDrawBackgroundColor(Textdraw32, 255);TextDrawFont(Textdraw32, 1);TextDrawLetterSize(Textdraw32, 0.509999, 1.700000);TextDrawColor(Textdraw32, 65535);TextDrawSetOutline(Textdraw32, 0);TextDrawSetProportional(Textdraw32, 1);TextDrawSetShadow(Textdraw32, 1);for(new i; i < MAX_PLAYERS; i ++){if(IsPlayerConnected(i)){ TextDrawShowForPlayer(i, Textdraw32);}}return 1;}public OnFilterScriptExit(){TextDrawHideForAll(Textdraw32);TextDrawDestroy(Textdraw32);return 1;}public OnPlayerConnect(playerid){TextDrawShowForPlayer(playerid, Textdraw32);return 1;}
new Text:mps;new pCount = 0;new maxplayers[128];public OnFilterScriptInit(){mps = TextDrawCreate(93.000000, 421.000000, \"Jatekosok x / 30\");return true;}public OnPlayerConnect(playerid){ for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount++; format (maxplayers, sizeof ( maxplayers ), \"Jatekosok: %i / 30\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawColor (mps,0xFF0000AA ); TextDrawShowForPlayer (playerid, mps );return true;}public OnPlayerDisconnect(playerid, reason){ for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount--; format (maxplayers, sizeof ( maxplayers ), \"Jatekosok: %i / 30\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawColor (mps,0xFF0000AA ); TextDrawShowForPlayer (playerid, mps );return true;}
De ez nem mét jól!
Ezt rakd be helyette: new Text:mps;new pCount = 0;new maxplayers[128];public OnFilterScriptInit(){mps = TextDrawCreate(93.000000, 421.000000, \"Jatekosok x / 30\");return true;}public OnPlayerConnect(playerid){ for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount++; format (maxplayers, sizeof ( maxplayers ), \"Jatekosok: %i / 30\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawColor (mps,0xFF0000AA ); TextDrawShowForPlayer (playerid, mps );return true;}public OnPlayerDisconnect(playerid, reason){ for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount--; format (maxplayers, sizeof ( maxplayers ), \"Jatekosok: %i / 30\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawColor (mps,0xFF0000AA ); TextDrawShowForPlayer (playerid, mps );return true;}
new Text:mps;new pCount = 0;new maxplayers[128];public OnFilterScriptInit(){mps = TextDrawCreate(93.000000, 421.000000, \"Jatekosok x / 30\");return true;}public OnPlayerConnect(playerid){pCount ++; format (maxplayers, sizeof ( maxplayers ), \"Jatekosok: %i / 30\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawColor (mps,0xFF0000AA ); TextDrawShowForPlayer (playerid, mps );return true;}public OnPlayerDisconnect(playerid, reason){ pCount --; format (maxplayers, sizeof ( maxplayers ), \"Jatekosok: %i / 30\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawColor (mps,0xFF0000AA ); TextDrawShowForPlayer (playerid, mps );return true;}
new Text:text,onlineplayer = 0,o_msg[24];public OnFilterScriptInit(){for(new g = 0; g < GetMaxPlayers( ); g++) if(IsPlayerConnected(g)) onlineplayer++;text = TextDrawCreate(93.000000, 421.000000, \"Jatekosok x / 30\");return true;}public OnPlayerConnect(playerid){onlineplayer++;format(o_msg, sizeof o_msg, \"Jatekosok: %i / 30\", onlineplayer);TextDrawSetString(text, o_msg);TextDrawColor(text, 0xFF0000AA);TextDrawShowForAll(text);return 1;}public OnPlayerDisconnect(playerid, reason){onlineplayer--;format(o_msg, sizeof o_msg, \"Jatekosok: %i / 30\", onlineplayer);TextDrawSetString(text, o_msg);TextDrawColor(text, 0xFF0000AA);TextDrawShowForAll(text);return 1;}