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;}