PDA

View Full Version : Spawning Error


Alex_T
24/03/2015, 12:18 AM
Everytime I spawn in I get Out of World Boundaries/Loading dialog. I am not sure why.

public OnAccountRegister(playerid)
{
PInfo[playerid][ID] = cache_insert_id();
printf("New account registered. ID: %d", PInfo[playerid][ID]);
SpawnPlayer(playerid);
SetPlayerPos(playerid, 1714.67, -1890.58, 13.57);
SetTimerEx("FirstSpawnTime",500, false, "d",playerid);
PInfo[playerid][Money] = 25000;
GivePlayerMoney(playerid, 25000);
return 1;
}
forward FirstSpawnTime(playerid);
public FirstSpawnTime(playerid)
{
SpawnPlayer(playerid);
SetPlayerPos(playerid, 1714.67, -1890.58, 13.57);
}

Abagail
24/03/2015, 12:21 AM
You need to set their spawn info using SetSpawnInfo before using SpawnPlayer.

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

fuckingcruse
24/03/2015, 03:56 PM
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

maximthepain
24/03/2015, 04:01 PM
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

http://wiki.sa-mp.com/wiki/SetPlayerPos
(playerid, Float: x, Float: y, Float: z)
No need angle.
Just SetSpawnInfo before SpawnPlayer.