10.12.2015, 20:38
Esta mal tu array.
pawn Код:
// ** INCLUDES
#include <a_samp>
// ** ARRAYS AND ENUMERATORS
enum eRandomSpawns
{
Float:random_spawn_x,
Float:random_spawn_y,
Float:random_spawn_z,
Float:random_spawn_angle
};
static const aRandomSpawns[][eRandomSpawns] =
{
{1154.0961, -1767.9318, 16.5938, 358.1200},
{1346.0240, -1751.6771, 13.3624, 0.9422},
{1586.1368, -1721.4606, 13.5469, 179.7958}
};
// ** MAIN
main()
{
print("Loaded \"random_spawns.amx\".");
}
// ** CALLBACKS
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerSpawn(playerid)
{
new selected = random(sizeof(aRandomSpawns));
SetPlayerPos(playerid, aRandomSpawns[selected][random_spawn_x], aRandomSpawns[selected][random_spawn_y], aRandomSpawns[selected][random_spawn_z]);
SetPlayerFacingAngle(playerid, aRandomSpawns[selected][random_spawn_angle]);
SetCameraBehindPlayer(playerid);
return 1;
}