new Float:RandomSpawn[][4] = // o 4 й o X,Y,Z, й o Angulo
{
// Positions, (X, Y, Z and Facing Angle)
{-2796.9854, 1224.8180, 20.5429, 192.0335}, // Ele Poderб Nascer Nesse Local
{-2454.2170, 503.8759, 30.0790, 267.2932}, // Ele Poderб Nascer Nesse Local
{-2669.7322, -6.0874, 6.1328, 89.8853} // Lembrando que o Ultimo й sem virgula, Ele Poderб Nascer Nesse Local
};
public OnPlayerSpawn(playerid)
{
new rand = random(sizeof(RandomSpawn)); // Definindo o "rand" Para Usar como random.
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]); // Para Setar a COR X,Y,Z Random
SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]); // Para Setar o Angulo Random
return 1;
}
error 021: symbol already defined: "OnPlayerSpawn" |
public OnPlayerSpawn(playerid) { new rand = random(sizeof(RandomSpawn)); // SetPlayerPos to the random spawn data SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]); // SetPlayerFacingAngle to the random facing angle data SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]); return 1; } |
public OnPlayerSpawn(playerid)
{
new rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
// ....