Random spawn
#6

Quote:
Originally Posted by Micko123
Посмотреть сообщение
There is no full code. This is DM mode that I am making. When connect player spawn in city and that is fine. But when he types /dm i want him to spawn on those coord i posted there. And i want every player to spawn on diferente coords (looping trought those i posted). Hope you understand
Alright, well let me edit my code for you.
pawn Код:
new Float:DMSpawn[][] = {
            {-409.1236, 2244.5474, 42.4297},
        {-408.6208, 2224.4314, 42.4297},
        {-419.5130, 2229.0693, 42.4297},
        {-370.0843, 2242.7195, 45.8725},
        {-355.8813, 2241.0496, 45.5545},
        {-374.6754, 2232.2986, 42.4844},
        {-394.5614, 2259.2595, 42.1517}
};

public OnPlayerSpawn(playerid) {
        new randomcoords = random(sizeof(DMSpawn));
        SetPlayerPos(playerid, DMSpawn[randomcoords][0], DMSpawn[randomcoords][1], DMSpawn[randomcoords][2]);
        return 1;
}
This should work for you.
Reply


Messages In This Thread
Random spawn - by Micko123 - 28.04.2016, 17:13
Re: Random spawn - by Luis- - 28.04.2016, 17:16
Re: Random spawn - by Micko123 - 28.04.2016, 17:19
Re: Random spawn - by Stinged - 28.04.2016, 17:19
Re: Random spawn - by Micko123 - 28.04.2016, 17:21
Re: Random spawn - by Luis- - 28.04.2016, 17:21
Re: Random spawn - by Micko123 - 28.04.2016, 17:24
Re: Random spawn - by Luis- - 28.04.2016, 17:28
Re: Random spawn - by Micko123 - 28.04.2016, 17:32
Re: Random spawn - by Luis- - 28.04.2016, 17:37

Forum Jump:


Users browsing this thread: 1 Guest(s)