SA-MP Forums Archive
Spawning Error - 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: Spawning Error (/showthread.php?tid=568659)



Spawning Error - Alex_T - 24.03.2015

Everytime I spawn in I get Out of World Boundaries/Loading dialog. I am not sure why.

PHP код:
public OnAccountRegister(playerid)
{
    
PInfo[playerid][ID] = cache_insert_id(); 
    
printf("New account registered. ID: %d"PInfo[playerid][ID]); 
    
SpawnPlayer(playerid);
    
SetPlayerPos(playerid1714.67, -1890.5813.57);
    
SetTimerEx("FirstSpawnTime",500false"d",playerid);
    
PInfo[playerid][Money] = 25000;
    
GivePlayerMoney(playerid25000);
    return 
1;
}
forward FirstSpawnTime(playerid);
public 
FirstSpawnTime(playerid)
{
    
SpawnPlayer(playerid);
    
SetPlayerPos(playerid1714.67, -1890.5813.57);




Re: Spawning Error - Abagail - 24.03.2015

You need to set their spawn info using SetSpawnInfo before using SpawnPlayer.

See:
wiki.sa-mp.com/wiki/SetSpawnInfo


Re: Spawning Error - fuckingcruse - 24.03.2015

Ofc you didn't set any angle , I.e

- SetPlayerPos(playerid, FLOAT:X, FLOAT:Y , FLOAT:Z , angle);
Orelse it will not spawn player

Good day

And check if there is something in OnPlayerInit and OnPlayerSpawn


Re: Spawning Error - maximthepain - 24.03.2015

Quote:
Originally Posted by fuckingcruse
Посмотреть сообщение
Ofc you didn't set any angle , I.e

- SetPlayerPos(playerid, FLOAT:X, FLOAT:Y , FLOAT:Z , angle);
Orelse it will not spawn player

Good day

And check if there is something in OnPlayerInit and OnPlayerSpawn
https://sampwiki.blast.hk/wiki/SetPlayerPos
(playerid, Float: x, Float: y, Float: z)
No need angle.
Just SetSpawnInfo before SpawnPlayer.