30.12.2013, 18:12
Quote:
Код:
new Float:RandomVehicles[][] = { {400}, {401}, {402}, {403}, {404}, {405}, {}, << all car's id you want here {}, << all car's id you want here {}, << all car's id you want here {}, << all car's id you want here {}, << all car's id you want here {}, << all car's id you want here {} << when all is added dont add "," }; public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/randomcar", cmdtext, true, 10) == 0) //randomcar is the command they'll be using to get car { new Random = random(sizeof(RandomVehicles)); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateVehicle(Random, x, y, z, 90, -1, -1, 60); //CreateVehicle([vehicle id], [x position], [y position], [z position], [rotation], [car color 1 (-1 = random color)], [car color 2], [respawn time(seconds)] return 1; } return 0; } |
---
Why -1, the last one is never going to be returned like that.