28.04.2016, 17:21
Quote:
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
|
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;
}