Playerspawn error - it spawns in blueberry
#1

Hi. I don't know why, but zombiespawn spawns ALWAYS only in blueberry and playerspawn spawns sometimes ok sometimes in Blueberry.

Zombie spawn code

Код HTML:
new Float:ZombieSpawns[4][3] =
{
    (-187.7326, 1145.7805, 19.5942),
    (-186.9749, 1143.8151, 19.5902),
    (-270.5009, 1100.1377, 19.5938),
    (74.7195, 1174.7144, 18.6641)

public OnPlayerSpawn(playerid)
{
 new spawn = random(sizeof(ZombieSpawns));
            SetPlayerPos(playerid, ZombieSpawns[spawn][0], ZombieSpawns[spawn][1], ZombieSpawns[spawn][2]);
};
They spawn only in blueberry and IDK why.



and playerspawn

Код HTML:
new Float:randomSpawns_DayZSA_Part1[4][3] =
{
 {-93.3059, 1162.1971, 19.7422},
 {-90.2034, 1227.7305, 19.7422},
 {-168.7010, 1171.6211, 19.7500},
 (108.8987, 1105.4291, 13.6094)
};

new randSpawn = random(sizeof(randomSpawns_DayZSA_Part1));
            SetPlayerPos_Allow(playerid,randomSpawns_DayZSA_Part1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2]);

Errors: Zombie spawns ONLY in blueberry (instead of spawning at those coords)
Players sometime spawns at right coords sometimes in blueberry.
Reply
#2

By zombie do you mean NPC?? If so, then NPCs have different callbacks.
Reply
#3

Blueberry is the center of the map so if u spawn there. The xyz values are 0,0,0
Reply
#4

Quote:
Originally Posted by coool
Посмотреть сообщение
By zombie do you mean NPC?? If so, then NPCs have different callbacks.
yes, i mean NPCs.


Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Blueberry is the center of the map so if u spawn there. The xyz values are 0,0,0

Well i don't want them to respawn in blueberry. They should respawn at my coordonates, but they don't.
Reply
#5

help?
Reply
#6

Are you using any plugins? Like MapAndreas?

Anyway, try to add a check for zombies before spawning them.
Код:
Under OnPlayerSpawn
if(IsPlayerNPC(playerid)){
// spawn them here.
}
Reply
#7

Quote:
Originally Posted by Ritzy
Посмотреть сообщение
Are you using any plugins? Like MapAndreas?

Anyway, try to add a check for zombies before spawning them.
Код:
Under OnPlayerSpawn
if(IsPlayerNPC(playerid)){
// spawn them here.
}

Yes & doesn't work.
Reply
#8

Are you loading MapAndreas at last?
Reply
#9

NPC & Spawns were ok untill i changed with new coordonates.
Reply
#10

Zombie spawns is fucked...

Код:
new Float:ZombieSpawns[4][3] =
{
    (-187.7326, 1145.7805, 19.5942),
    (-186.9749, 1143.8151, 19.5902),
    (-270.5009, 1100.1377, 19.5938),
    (74.7195, 1174.7144, 18.6641)

public OnPlayerSpawn(playerid)
There's no closing }.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)