SA-MP Forums Archive
SpawnPlayer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SpawnPlayer (/showthread.php?tid=304136)



SpawnPlayer - vladi866 - 17.12.2011

Umm I have kind of wierd problem I changed the mode version to 0.3D and it coused a little wierd problem that Idk how to fix it..
there is my OnPlayerSpawn:
PHP код:
    SetPlayerVirtualWorld(playerid,0);
    
TogglePlayerControllable(playerid,1);
    if(
gPlayerLogged[playerid] == 0)
    {
        
SendClientMessage(playeridCOLOR_LIGHTRED"** This server requires a Login BEFORE spawn (Kicked) **");
        
Kick(playerid);
     }
    
SetPlayerSpawn(playerid);
    
SetPlayerToTeamColor(playerid); 
the problem is that when I login and it suppose to spawn it does "server closed the connection" and I check the old version and it works fine Idk what the problem is...
Please help :P


Re: SpawnPlayer - suhrab_mujeeb - 17.12.2011

This is where the problem is
pawn Код:
if(gPlayerLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn (Kicked) **");
        Kick(playerid);
     }



Re: SpawnPlayer - [ABK]Antonio - 17.12.2011

Put the Kick part on OnPlayerRequestSpawn


Re: SpawnPlayer - vladi866 - 17.12.2011

it's not sending that message tho..

edit: I tried to remove that kick and it didn't help..
someone please help me I tried in older verions and it works find I just change the include start the server and it makes the problem..


Re: SpawnPlayer - vladi866 - 18.12.2011

someone help please?


Re: SpawnPlayer - jamesbond007 - 18.12.2011

https://sampforum.blast.hk/showthread.php?tid=303454


Re: SpawnPlayer - Celson - 18.12.2011

Put SetSpawnInfo before SpawnPlayer and it will solve the problem. This bug will be fixed in the next update says Kalcor.


Re: SpawnPlayer - vladi866 - 19.12.2011

Thanks bro' it's working finnaly!!!!...


Re: SpawnPlayer - Larry123 - 11.01.2012

But if i put setspawninfo before SpawnPlayer then my real spawning text( Choose right pos and texts ) then texts getting spamming like that: