#include < a_samp >new Text:mps;#define COLOR_WITHE 0xFFFFFFAA#define COLOR_BLACK 0x000000AApublic OnGameModeInit(){ mpss = TextDrawCreate(1.0, 5.6, \"Max Playerek száma : 50 / \"); return 1;}public OnPlayerConnect(playerid){ new maxplayers[ 128 ]; format(maxplayers, sizeof(maxplayers), \"Max Playerek száma : 50 /%i\", GetMaxPlayers()); TextDrawSetString(mps, maxplayers); TextDrawUseBox(mps , 1); TextDrawBoxColor(mps,0x000000AA); TextDrawColor(mps,0xFFFFFFAA); TextDrawShowForPlayer(playerid, mps); return 1;}
new iPlayers;for( new x = 0; x < MAX_PLAYERS; ++x ) { if( !IsPlayerConnected( x ) || IsPlayerNPC( x ) ) continue; ++iPlayers;}format(maxplayers, sizeof(maxplayers), \"Online Playerek száma : 40 /%i\", iPlayers );
Draven a GetMaxPlayer(); függvény arra jó hogy lekérd hogy hány slotos a szerver..
Ok és kössz De lehet \"\"0.2x\"\"-hez ? ^^Láttam más 0.2x es szerón is ilyet.
Igen, ugyan úgy muködni fog.
stock GetOnlinePlayers(){new pCount = 0;for(new g=0; g < GetMaxPlayers(); g++) if(IsPlayerConnected(g)) pCount++;return pCount;}
Igen, ugyan úgy muködni fog. Az IsPlayerNPC-t nem fogja felismerni,mivel 0.2x ben nem voltak NPC-k.Ezt leszamitva mukodni fog. [/quote]Draven scriptét néztem...ZeRo módosítását nem vettem figyelembe.
#include < a_samp >new Text: mps;new pCount = 0;new maxplayers[ 128 ];#define COLOR_WITHE 0xFFFFFFAA#define COLOR_BLACK 0x000000AApublic OnGameModeInit( ){ mpss = TextDrawCreate( 1.0, 5.6, \"Max Playerek száma : 50 / X\" ); return 1;}public OnPlayerConnect ( playerid ){ for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount++; format (maxplayers, sizeof ( maxplayers ), \"Max Playerek száma : 50 /%i\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawUseBox (mps , 1 ); TextDrawBoxColor (mps,0x000000AA ); TextDrawColor (mps,0xFFFFFFAA ); TextDrawShowForPlayer (playerid, mps ); return 1;}
Tessék, #include < a_samp >new Text: mps;new pCount = 0;new maxplayers[ 128 ];#define COLOR_WITHE 0xFFFFFFAA#define COLOR_BLACK 0x000000AApublic OnGameModeInit( ){ mpss = TextDrawCreate( 1.0, 5.6, \"Max Playerek száma : 50 / X\" ); return 1;}public OnPlayerConnect ( playerid ){ for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount++; format (maxplayers, sizeof ( maxplayers ), \"Max Playerek száma : 50 /%i\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawUseBox (mps , 1 ); TextDrawBoxColor (mps,0x000000AA ); TextDrawColor (mps,0xFFFFFFAA ); TextDrawShowForPlayer (playerid, mps ); return 1;}public OnPlayerDisconnect(playerid, reason){ for(new g=0; g < GetMaxPlayers(); g++) if(IsPlayerConnected(g)) pCount--; format (maxplayers, sizeof ( maxplayers ), \"Max Playerek száma : 50 /%i\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawUseBox (mps , 1 ); TextDrawBoxColor (mps,0x000000AA ); TextDrawColor (mps,0xFFFFFFAA ); TextDrawShowForPlayer (playerid, mps ); return 1;}
#include < a_samp >new Text: mps;new pCount = 0;new maxplayers[ 128 ];#define COLOR_WITHE 0xFFFFFFAA#define COLOR_BLACK 0x000000AApublic OnGameModeInit( ){ mpss = TextDrawCreate( 1.0, 5.6, \"Max Playerek száma : 50 / X\" ); return 1;}public OnPlayerConnect ( playerid ){ for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount++; format (maxplayers, sizeof ( maxplayers ), \"Max Playerek száma : 50 /%i\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawUseBox (mps , 1 ); TextDrawBoxColor (mps,0x000000AA ); TextDrawColor (mps,0xFFFFFFAA ); TextDrawShowForPlayer (playerid, mps ); return 1;}public OnPlayerDisconnect(playerid, reason){ for(new g=0; g < GetMaxPlayers(); g++) if(IsPlayerConnected(g)) pCount--; format (maxplayers, sizeof ( maxplayers ), \"Max Playerek száma : 50 /%i\", pCount ); TextDrawSetString ( mps, maxplayers ); TextDrawUseBox (mps , 1 ); TextDrawBoxColor (mps,0x000000AA ); TextDrawColor (mps,0xFFFFFFAA ); TextDrawShowForPlayer (playerid, mps ); return 1;}