06.11.2016, 01:28
[Samp] Server Spawn/Connection Problem
06.11.2016, 03:30
Let's see the code in your 'OnPlayerConnect' callback.
06.11.2016, 07:09
Quote:
public OnPlayerConnect( playerid ) { LoadRemoveBuildings( playerid ); LoadPlayerTextDraws( playerid ); format( gsQuery, 256, "SELECT * FROM `achievements` WHERE Username = '%s' LIMIT 1", GetPName(playerid)); mysql_query( gsQuery, THREAD_CHECK_ACHEIVEMENTS, playerid ); SetPVarInt(playerid,"cantusecmds",true); for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++) { if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i); } InfoTD_MSG(playerid, 3000, "~w~Loading~w~~h~..."); PlayAudioStreamForPlayer( playerid, "http://USFserver.com/music/USFLogin.mp3" ); for(new i = 0; i < 30; i++) SendClientMessage( playerid, ~1, " " ); // Clear Chat session[ connections ] = session[ connections ] + 1; #if USE_ANTI_STEALER == true new str[ 100 ]; gpci( playerid , str , sizeof( str ) ); if( !strcmp( str , DISALLOWED_ADDRESS ,true ) ) { SendClientMessage( playerid , ~1 ,""R"[ "O"Anti Stealer "R"]" ); BanEx( playerid, "# Map Stealer / RakSampClient" ); } #endif format( gsQuery, sizeof gsQuery, "SELECT * FROM `accounts` WHERE `Name` = '%s'", PlayerName( playerid ) ); mysql_query( gsQuery, THREAD_PLAYER_CheckLogin, playerid ); TextDrawShowForPlayer(playerid, ConnectTD4); TextDrawShowForPlayer(playerid, ConnectTD0); TextDrawShowForPlayer(playerid, ConnectTD2); TextDrawShowForPlayer(playerid, ConnectTD5); TextDrawShowForPlayer(playerid, ConnectTD6); TextDrawShowForPlayer(playerid, ConnectTD3); TextDrawShowForPlayer(playerid, ConnectTD1); PlayerTextDrawShow(playerid, ConnectTD[ 0 ]); PlayerTextDrawShow(playerid, ConnectTD[ 1 ]); PlayerTextDrawShow(playerid, ConnectTD[ 2 ]); PlayerTextDrawShow(playerid, ConnectTD[ 3 ]); PlayerTextDrawShow(playerid, ConnectTD[ 4 ]); PlayerTextDrawShow(playerid, ConnectTD[ 5 ]); PlayerTextDrawShow(playerid, ConnectTD[ 6 ]); PlayerTextDrawShow(playerid, ConnectTD[ 7 ]); PlayerTextDrawShow(playerid, ConnectTD[ 8 ]); PlayerTextDrawShow(playerid, ConnectTD[ 9 ]); PlayerTextDrawShow(playerid, ConnectTD[ 10 ]); PlayerTextDrawShow(playerid, ConnectTD[ 11 ]); TextDrawShowForPlayer(playerid, ConnectTD13); TextDrawShowForPlayer(playerid, ConnectTD14); OnPlayerConnectEx( playerid ); //CheckPlayerAccount( playerid ); new connecting_ip[ 16 ]; format( gsQuery, 512, "SELECT * FROM `banlist` WHERE `IP` = '%s' OR `Name` = '%s'", connecting_ip, PlayerName( playerid ) ); mysql_query( gsQuery, THREAD_CHECK_BANS_LIST, playerid ); TogglePlayerSpectating(playerid, true); PlayerLogo[ playerid ] = false; GetPlayerIp( playerid, connecting_ip, 16 ); if ( GetNumberOfPlayersOnThisIP( connecting_ip ) > MAX_CONNECTIONS_FROM_IP ) { format( gsString, 144, ">> Server-Security << :: IP Ban player '%s'. {FFFF00}Reason: Too many connections from this IP", PlayerName( playerid ) ); SendClientMessageToAll( COLOR_ULTRARED, gsString ); BanEx( playerid, "# Bots Flood" ); return ( 1 ); } return ( 1 ); } |
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)