Question Help: Facing Angle
#1

in this very simple example, i have included, the angle.. but when i spawn set me the wrong facing angle.. why ? the coordinates are right..

PHP код:
new FloatExampleRandomSpawn[][4] =
{
    {-
2796.98541224.818020.5429192.0335},
    {-
2454.2170503.875930.0790267.2932},
    {-
2669.7322, -6.08746.132889.8853}
}; 
PHP код:
public OnPlayerSpawn(playerid)
{
    new 
rand random(sizeof(ExampleRandomSpawn));
    
SetPlayerPos(playeridExampleRandomSpawn[rand][0], ExampleRandomSpawn[rand][1], ExampleRandomSpawn[rand][2]);
 
    
SetPlayerFacingAngle(playeridExampleRandomSpawn[rand][3]);
    return 
1;

Reply
#2

Weird, try SetSpawnInfo.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new rand = random(sizeof(ExampleRandomSpawn));

    SetSpawnInfo(playerid, team, skin, ExampleRandomSpawn[rand][0], ExampleRandomSpawn[rand][1], ExampleRandomSpawn[rand][2], ExampleRandomSpawn[rand][3], weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
}
Reply
#3

Quote:
Originally Posted by Finn
Посмотреть сообщение
Weird, try SetSpawnInfo.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new rand = random(sizeof(ExampleRandomSpawn));

    SetSpawnInfo(playerid, team, skin, ExampleRandomSpawn[rand][0], ExampleRandomSpawn[rand][1], ExampleRandomSpawn[rand][2], ExampleRandomSpawn[rand][3], weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
}
SetSpawnInfo(...);

... There are parameters that do not serve me
Reply
#4

So leave them 0 and set them afterwards how you want.
Reply
#5

Quote:
Originally Posted by Finn
Посмотреть сообщение
So leave them 0 and set them afterwards how you want.
mhm... set me to the coordinates 0.0, 0.0, 0.0 ,0.0 ... when i spawn

PHP код:
            new
                
rand random(sizeof(ExampleRandomSpawn));
                
            
SetSpawnInfo(playerid, -1, -1ExampleRandomSpawn[rand][0], ExampleRandomSpawn[rand][1], ExampleRandomSpawn[rand][2], ExampleRandomSpawn[rand][3], 912640032400); 
and in the top i have definied the coordinates...
Reply
#6

maybe this function will help
pawn Код:
SpawnPlayer(playerid);
Place this under ur SetSpawnInfo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)