[Ayuda] Spawns dinбmicos
#1

Hola, despues de un tiempo de aprender cosas para un server, he estado haciendo unos spawns dinamicos, pero el problema, es que algunos de los spawns hacen que el jugador estй viendo la pared, mi pregunta es, їComo pongo SetPlayerFacingAngle para el siguiente codigo?

pawn Код:
new Float:gRandomPlayerSpawns[9][3] = {
{2495.2769,-1687.5035,13.5156},  
{1481.0686,-1772.3132,18.7958},  
{1365.3500,-1279.0601,13.5469},  
{1170.9126,-1489.7921,22.7551},  
{1834.4000,-1681.7500,13.4331},  
{1685.7882,-2237.5410,13.5469},  
{1122.7083,-2036.9764,69.8942},  
{1497.0632,-687.8925,95.5633},  
{411.9961,-1729.3324,9.3733}
};

public OnPlayerSpawn(playerid)
{
    SetPlayerRandomSpawn(playerid);
    SetPlayerInterior(playerid, 0);
    return 1;
}


public SetPlayerRandomSpawn(playerid)
{
        new rand = random(sizeof(gRandomPlayerSpawns));
        SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
}
їQue hago?

PD: Se que soy medio noob en esto
Reply
#2

Quote:
Originally Posted by Code8976Man
Посмотреть сообщение
pawn Код:
new Float:gRandomPlayerSpawns[9][4] = {
{2495.2769,-1687.5035,13.5156, FLOAT:FACINGANGLE ...},  
{1481.0686,-1772.3132,18.7958, FLOAT:FACING},  
{1365.3500,-1279.0601,13.5469, FLOAT:FACING},  
{1170.9126,-1489.7921,22.7551, FLOAT:FACING},  
{1834.4000,-1681.7500,13.4331, FLOAT:FACING},  
{1685.7882,-2237.5410,13.5469, FLOAT:FACING},  
{1122.7083,-2036.9764,69.8942, FLOAT:FACING},  
{1497.0632,-687.8925,95.5633, FLOAT:FACING},  
{411.9961,-1729.3324,9.3733, FLOAT:FACING}
};

public OnPlayerSpawn(playerid)
{
    SetPlayerRandomSpawn(playerid);
    SetPlayerInterior(playerid, 0);
    return 1;
}


public SetPlayerRandomSpawn(playerid)
{
        new rand = random(sizeof(gRandomPlayerSpawns));
        SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
       SetPlayerFacingAngle(playerid,  gRandomPlayerSpawns[rand][3]);
}
Prueba esto!
pawn Код:
D:\Users\Eduardo\Documents\SA-MP Server\gamemodes\BronyLand.pwn(9) : error 017: undefined symbol "FACINGANGLE"
D:\Users\Eduardo\Documents\SA-MP Server\gamemodes\BronyLand.pwn(18) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
PD: Tengo #float

Edit: si le pongo un numero en FLOAT:FACINGANGLE me da:
pawn Код:
D:\Users\Eduardo\Documents\SA-MP Server\gamemodes\BronyLand.pwn(9) : warning 213: tag mismatch
Reply
#3

Quote:
Originally Posted by Code8976Man
Посмотреть сообщение
Donde te puse FACINANGLE debes remplazarlo por las coordenadas del Float. Osea, el бngulo, ej: 180.0 ...
Ahora si...

Gracias
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)