29.06.2014, 19:19
Hello everyone! I have this code under OnGameModeInit:
It should add 2 Cheetahs in-game, however, whenever I connect and spawn, the vehicles spawn and 1 vehicle spawn above them. So 4 vehicles spawn in total.
I'm not sure why, I checked my code and I do not have duplicate lines or anything, maybe it is a bug? Help me, please!
EDIT 0: I've added the lines to the OnPlayerSpawn public and It worked, so there must be a problem with OnGameModeInit. It probably has been called twice or something, I'm not sure. Someone got an idea why this happens?
EDIT 1: I've managed to fix the problem. There was something wrong with main() being not able to be executed.
Код:
CreateVehicle(415, -1605.1000000, 651.4000200, 7.0000000, 0.0000000, 0, 0, -1); CreateVehicle(415, -1594.1000000, 674.0000000, 7.0000000, 180.0000000, 0, 0, -1);
I'm not sure why, I checked my code and I do not have duplicate lines or anything, maybe it is a bug? Help me, please!
EDIT 0: I've added the lines to the OnPlayerSpawn public and It worked, so there must be a problem with OnGameModeInit. It probably has been called twice or something, I'm not sure. Someone got an idea why this happens?
EDIT 1: I've managed to fix the problem. There was something wrong with main() being not able to be executed.