Problem with spawning - 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: Problem with spawning (
/showthread.php?tid=250701)
Problem with spawning -
sobolanux - 24.04.2011
Hello there. I`m having a problem with spawning a player after login. At the OnGameModeInit I have a class defined, under OnPlayerSpawn I have nothing scripted and I spawn the player after he click a button on a dialog.
Code:
Код:
new Float:lastX = pInfo[playerid][pLastX];
new Float:lastY = pInfo[playerid][pLastY];
new Float:lastZ = pInfo[playerid][pLastZ];
new Float:lastRot = pInfo[playerid][pLastRot];
TestVars2(playerid);
SpawnPlayer(playerid); SetPlayerPos(playerid, lastX, lastY, lastZ);
SetPlayerFacingAngle(playerid, lastRot);
pInfo[playerid][pIsSpawned] = 1;
pInfo[playerid][PSpawnedFromIntro] = 0;
GivePlayerMoney(playerid, pInfo[playerid][pMoney]);
pInfo[playerid][pIsLogged] = 1;
So, when he clicks the button it just appears the class selection menu and he has to manually spawn. I tested the pInfo[playerid][pIsLogged] and the location vars and they are defined, so there isn`t a problem with the variables. Any suggestions?
Re: Problem with spawning -
sobolanux - 25.04.2011
Bump...maybe?
Re: Problem with spawning -
Admigo - 25.04.2011
What is the function of this?