SpawnPlayer
#1

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
Reply
#2

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);
     }
Reply
#3

Put the Kick part on OnPlayerRequestSpawn
Reply
#4

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..
Reply
#5

someone help please?
Reply
#6

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

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

Thanks bro' it's working finnaly!!!!...
Reply
#9

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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)