AddPlayerClass(0,622.2733,892.5632,-35.2678,332.7885,0,0,0,0,0,0); // Pos1 AddPlayerClass(0,682.1865,836.6607,-42.9609,235.6544,0,0,0,0,0,0); // Pos2 AddPlayerClass(0,540.3431,840.1038,-41.1784,100.0032,0,0,0,0,0,0); // Pos2 AddPlayerClass(0,466.4939,888.5435,-28.5861,246.7895,0,0,0,0,0,0); // Pos4
// Add this somewhere under the includes
new Float:SpawnPoints[4][4] =
{
{622.2733,892.5632,-35.2678,332.7885,
{682.1865,836.6607,-42.9609,235.6544},
{540.3431,840.1038,-41.1784,100.0032},
{466.4939,888.5435,-28.5861,246.7895}
};
new rnd;
rnd = random(sizeof (SpawnPoints));
SetPlayerPos(playerid, SpawnPoints[rnd][0], SpawnPoints[rnd][1], SpawnPoints[rnd][2]);
SetPlayerFacingAngle(playerid, SpawnPoints[rnd][3]);
D:\Gta\Pwano\gamemodes\Gungame.pwn(11) : error 008: must be a constant expression; assumed zero D:\Gta\Pwano\gamemodes\Gungame.pwn(14) : error 001: expected token: "}", but found ";" D:\Gta\Pwano\gamemodes\Gungame.pwn(76) : warning 217: loose indentation D:\Gta\Pwano\gamemodes\Gungame.pwn(78) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
D:\Gta\Pwano\gamemodes\Gungame.pwn(10) : error 001: expected token: "}", but found ";" D:\Gta\Pwano\gamemodes\Gungame.pwn(14) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
{622.2733,892.5632,-35.2678,332.7885};
};
it will gives much erros as your adding the CJ skin like 4 times....
As far as i know you can do it only once per skin id pawn Код:
pawn Код:
|
new Float:RandomSpawn[][5] =
{
// Positions, (X, Y, Z and Facing Angle)
{1827.8083,-1858.1565,13.5781,90.8463},
{1221.8761,-1816.1857,16.5938,179.5371},
{2227.1499,-1159.4750,25.7790,89.5271},
{670.9753,-1261.9874,13.6250,359.4768}
};
public OnPlayerSpawn(playerid)
{
new rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
return 1;
}