24.04.2011, 09:16
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:
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?
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;

