Wrong Coordonates?
#1

PHP код:
new Float:randomSpawns_DayZSA_Part1[4][4] =
{
 {
2899.3059 ,-1624.4517 ,11.8779},
 {
2457.3726 ,-1666.8768 ,14.1584},
 {
2093.8362 ,-1773.7025 ,14.3506},
 (
2679.3730 ,-1540.8654 ,25.6224)
};
    if(
pInfo[playerid][pFirstSpawn] == 1)
        {
            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]); 

Sometimes, it spawns me in that zone of Blueberry. I don't know why.


All of the coordonates seems to be working.
Reply
#2

change this
PHP код:
          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]); 
To this
PHP код:
          new randSpawn random(sizeof(randomSpawns_DayZSA_Part1));
            
SetSpawnInfo(playerid,randomSpawns_DayZSA_Part1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2]); 
Reply
#3

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
change this
PHP код:
          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]); 
To this
PHP код:
          new randSpawn random(sizeof(randomSpawns_DayZSA_Part1));
            
SetSpawnInfo(playerid,randomSpawns_DayZSA_Part1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2]); 
If you're going to be using setspawninfo make sure you're Spawning the player straight after this is set with
PHP код:
SpawnPlayer(playerid); 
If you're trying to spawn the player first you'll spawn at blueberry
Reply
#4

If you're trying to spawn the player first you'll spawn at blueberry[/QUOTE]



And how to set it?



PHP код:
 warning 213tag mismatch
 
warning 213tag mismatch
 
warning 202number of arguments does not match definition
 
warning 202number of arguments does not match definition
 
warning 202number of arguments does not match definition
 
warning 202number of arguments does not match definition
 
warning 202number of arguments does not match definition
 
warning 202number of arguments does not match definition
 
warning 202number of arguments does not match definition
 
warning 202number of arguments does not match definition
 
warning 202number of arguments does not match definition 
Reply
#5

It should be
PHP код:
SetSpawnInfoplayerid00randomSpawns_DayZSA_Part1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2], 000000);
SpawnPlayer(playerid); 
More information here: https://sampwiki.blast.hk/wiki/SetSpawnInfo
Reply
#6

Float, Float:y, Float:z,


But at my Float:randomSpawns_DayZSA_Part1[4][4] = i already have 4 XYZ coordonates.

and skin i need to edit, right?
Reply
#7

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
Float, Float:y, Float:z,


But at my Float:randomSpawns_DayZSA_Part1[4][4] = i already have 4 XYZ coordonates.

and skin i need to edit, right?
PHP код:
SetSpawnInfoplayerid0/*Skin id here*/randomSpawns_DayZSA_Part1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2], randomSpawns_DayZSA_Part1[randSpawn][3], 00000); 
Reply
#8

Thanks, but now it's worse.

http://i.imgur.com/4l9BEw5.png


It won't spawn me at all.

At first it shows me partially my "randomspawn" coords but fastly spawns me at blueberry


it's like it spawns me twice, i think

http://i.imgur.com/ar8ZXXb.jpg

see?


PHP код:
function SetPlayerPos_Allow(playeridFloat:px_abFloat:py_abFloat:pz_ab)
{
    
abAllow[playerid] = 1;
    
defer ResetAB_Allow(playerid);
    
SetPlayerPos(playeridpx_abpy_abpz_ab);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)