Spawning Error
#1

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);

Reply
#2

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

See:
wiki.sa-mp.com/wiki/SetSpawnInfo
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)