Spawn points Help
#1

Random Spawn points for 2 Teams, would this work? http://pastebin.com/TWVbPLfR
Reply
#2

Okey. I will try to help you if you will provide your 'team' variable. You know .. something like PlayerInfo[playerid][pTeam].
Waiting your response.

But .. you can also read this topic, who helps you to make random spawn points: https://sampforum.blast.hk/showthread.php?tid=162488
Reply
#3

http://pastebin.com/32XzYZpp
Reply
#4

This should give you an idea, I took it from my Gamemode and edited it a bit so you can change set the player's interior.

pawn Код:
new Float:RandomSpawns[][] = // Somewhere at the top of your script
{
    //{X, Y, Z, FACING, INTERIOR ID}
    {1991.7661, -2053.8508, 13.5477, 90.9991, 0}, // Interior ID 0 (Outside)
    {1991.7661, -2053.8508, 13.5477, 90.9991, 1}, // Interior ID 2
    {1991.7661, -2053.8508, 13.5477, 90.9991, 2} // Interior ID 3
};
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]);
    SetPlayerInterior(playerid, RandomSpawns[Random][4]);
    SetCameraBehindPlayer(playerid);
   
    return 1;
}
Reply
#5

so would i be able to change that a bit? with teams,
like this
http://pastebin.com/c19398kX

Oh no i wont need that, as they are already defined as 0 1 2 3 etc, thanks for your help +rep
Reply
#6

Would this work for the random spawns?
http://pastebin.com/TWVbPLfR
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)