changing coords, don't work.
#1

im using vortex roleplay 2 and I tried changing the coords in MYSQL... FAIL
it don't work and If I have to change them, where abouts in the GM
OnPlayerConnect
OnPlayerSpawn...
Where?

Will Rep++ to anyone who helps.
Reply
#2

OnPlayerSpawn
Reply
#3

the spawn is still in the same place :/
Reply
#4

Do you know why?
Reply
#5

Look on the onplayerspawn callback, see if it says anything about setting playerpos.
Reply
#6

Change the coordinates
pawn Код:
//On Top
new Float:RandomSpawns[][] =
{
    {1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
    {1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
    {1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
    {718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
    {722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
pawn Код:
public OnPlayerSpawn(playerid)
{
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
    return 1;
}
Reply
#7

I done that brett still don't work, tried changing thru GM and thru my DATABASE...
Reply
#8

Well, I am not sure, if on DataBase there are to set coordinates for OnPlayerSpawn because I never used it.
As I post on my above post, this is for random spawn. Just add on the top of your Gamemode
pawn Код:
new Float:RandomSpawns[][] =
{
    {1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
    {1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
    {1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
    {718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
    {722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
this. Change the X, Y, Z to the coordinates you want!
After go OnPlayerSpawn and add this. Also, check if you have anything else about random spawns and remove it because they will mix and there will be problem after that.
pawn Код:
public OnPlayerSpawn(playerid)
{
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
    return 1;
}
Reply
#9

still dont work.
Reply
#10

The stupid question nobody has asked is, What coordinates do you want to change? The spawn coordinates or..


- Camacorn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)