Quote:
Originally Posted by SickAttack
Store the coordinates in the array "aRandomSpawns" and do as followed:
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 };
new aRandomSpawns[][eRandomSpawns];
// ** 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; }
|
Ty but i store like this now:
aRandomSpawns[random_spawn_x] = mapValues1[pMXs1];
But i got an error.
array sizes do not match, or destination array is too small