random spawn problem
#1

I made this random spawn system but when i choose terrorist class it spawns me all the way in las ventras and none of the spawn points are not in lv. And this isnt the only random spawn i made but the others work other than this.

pawn Код:
new Float:Randomter[][] =
{
    // terrorist spawns
    (649.1878,-1513.9203,14.8651,85.4113),
    {660.1678,-1423.0903,14.8715,355.1891},
    {865.6883,-1364.9763,13.5764,164.7453},
    (952.1868,-909.1931,45.7656,186.2330),
    (1115.5122,-1011.1461,29.8594,23.4913)
};

//onplayerspawn
  if( gTeam[playerid] == TEAM_TER)
    {
        new TRandom = random(sizeof(Randomter));
        SetPlayerPos(playerid, Randomter[TRandom][0],  Randomter[TRandom][1],   Randomter[TRandom][2]);
        ServerWeapon(playerid, 30, 90);
        ServerWeapon(playerid, 24, 90);
    }
Reply
#2

pawn Код:
new Float:Randomter[][4] =
{
    // terrorist spawns
    {649.1878,-1513.9203,14.8651,85.4113},
    {660.1678,-1423.0903,14.8715,355.1891},
    {865.6883,-1364.9763,13.5764,164.7453},
    {952.1868,-909.1931,45.7656,186.2330},
    {1115.5122,-1011.1461,29.8594,23.4913}
};
Reply
#3

player still spawn at farm.

Im wondering if i should delete the x,y,z coo from this

pawn Код:
AddPlayerClass(126,649.1878,-1513.9203,14.8651,85.4113,0,0,0,0,0,0); // terro spawn 1
Reply
#4

Make sure you have added 'AddPlayerClass' on gamemode init and

also try this

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
     SpawnPlayer(playerid);
     return 1;
}
Reply
#5

Quote:
Originally Posted by Ryz
Посмотреть сообщение
Make sure you have added 'AddPlayerClass' on gamemode init and

also try this

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
     SpawnPlayer(playerid);
     return 1;
}
I have addplayerclass and spawnplayer will spawn the player imedietly after they try to select skin
Reply
#6

Bump
Reply
#7

Quote:
Originally Posted by 1fret
Посмотреть сообщение
I have addplayerclass and spawnplayer will spawn the player imedietly after they try to select skin
ok than modifie this


pawn Код:
public OnPlayerRequestSpawn(playerid)
{
     return 1;
}
And add
pawn Код:
SpawnPlayer(playerid);
where your all function complete
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)