Problema SpawnPlayer(playerid)
#6

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;
}
Reply


Messages In This Thread
Problema SpawnPlayer(playerid) - by wharlos - 10.12.2015, 15:45
Respuesta: Problema SpawnPlayer(playerid) - by xGenius - 10.12.2015, 15:57
Respuesta: Problema SpawnPlayer(playerid) - by wharlos - 10.12.2015, 16:04
Respuesta: Problema SpawnPlayer(playerid) - by Unrea1 - 10.12.2015, 17:20
Respuesta: Problema SpawnPlayer(playerid) - by wharlos - 10.12.2015, 17:57
Re: Problema SpawnPlayer(playerid) - by SickAttack - 10.12.2015, 20:38
Respuesta: Problema SpawnPlayer(playerid) - by Unrea1 - 10.12.2015, 21:41
Re: Respuesta: Problema SpawnPlayer(playerid) - by SickAttack - 10.12.2015, 22:03
Respuesta: Problema SpawnPlayer(playerid) - by wharlos - 11.12.2015, 01:47
Re: Respuesta: Problema SpawnPlayer(playerid) - by SickAttack - 11.12.2015, 01:53

Forum Jump:


Users browsing this thread: 2 Guest(s)