SA-MP Forums Archive
SpawnPlayer doesn't work ! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SpawnPlayer doesn't work ! (/showthread.php?tid=257221)



SpawnPlayer doesn't work ! - ylleron - 24.05.2011

Hey guys, i am making my gm and if i go to server --> login table and if i pressed LOGIN so that should auto-spawn me.

i set it after load account variables but it doesn't work. Please help me !!


Re: SpawnPlayer doesn't work ! - Stigg - 24.05.2011

It would help if we could see the code ?


Re: SpawnPlayer doesn't work ! - Markx - 24.05.2011

pawn Код:
SpawnPlayer(playerid);



Re: SpawnPlayer doesn't work ! - ylleron - 24.05.2011

Quote:
Originally Posted by Markx
Посмотреть сообщение
pawn Код:
SpawnPlayer(playerid);
Yes bro, i know it and i use this

Код:
if (dialogid == D_LOGIN)
	{
	    if (response)
		{
		   ...
                   .....
                    ....

                    ....
                   set all variables
					
			P_DATA[playerid][Login] = true;
			return SpawnPlayer(playerid);
		}
	}



Re: SpawnPlayer doesn't work ! - Elka_Blazer - 24.05.2011

First , OnPlayerConnect you shot SetSpawnInfo to this playerid ....
Then whenever you load your variables, you should first spawn the player , then load them .


This forum requires that you wait 120 seconds between posts. Please try again in 18 seconds.BULLSHIT!


Re: SpawnPlayer doesn't work ! - ylleron - 24.05.2011

ok i must set first spawnplayer(playerid) ?


Re: SpawnPlayer doesn't work ! - Elka_Blazer - 24.05.2011

You got a register system ?
Anyways, You gotta SetSpawnInfo(playerid....)
https://sampwiki.blast.hk/wiki/SetSpawnInfo

Then you will need to spawnplayer
then set the player variables , and give him weapons.



Re: SpawnPlayer doesn't work ! - ylleron - 24.05.2011

eehm, i have register system by dini


Re: SpawnPlayer doesn't work ! - ylleron - 24.05.2011

i must use setspawn info in that dialog

SetSpawnInfo(.....
SpawnPlayer(playerid);


Re: SpawnPlayer doesn't work ! - Mean - 24.05.2011

Yes, and idk if it will help, never actually tried, but try returning 0 in OnPlayerRequestClass. I got SetSpawnInfo and SpawnPlayer in my zombie script and I'm returning 0 in OnPlayerRequestClass, everything works.