new Float: ExampleRandomSpawn[][4] =
{
{-2796.9854, 1224.8180, 20.5429, 192.0335},
{-2454.2170, 503.8759, 30.0790, 267.2932},
{-2669.7322, -6.0874, 6.1328, 89.8853}
};
public OnPlayerSpawn(playerid)
{
new rand = random(sizeof(ExampleRandomSpawn));
SetPlayerPos(playerid, ExampleRandomSpawn[rand][0], ExampleRandomSpawn[rand][1], ExampleRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, ExampleRandomSpawn[rand][3]);
return 1;
}
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);
}
Weird, try SetSpawnInfo.
pawn Код:
|
new
rand = random(sizeof(ExampleRandomSpawn));
SetSpawnInfo(playerid, -1, -1, ExampleRandomSpawn[rand][0], ExampleRandomSpawn[rand][1], ExampleRandomSpawn[rand][2], ExampleRandomSpawn[rand][3], 9, 1, 26, 400, 32, 400);
SpawnPlayer(playerid);