12.06.2014, 16:31
Hello guys, so I tried putting a vehicle as an objective, but I guess I failed to do so. Here is the code:
Everything is alright, car gets spawned at random spawnpoints, it sets the checkpoint to the right place and CP variable works good. The only thing that doesn't work is the yellow marker, it isn't at the top of the vehicle. Any help is appreciated, thanks !
pawn Код:
new rand = random(sizeof(Gorev2AracSpawn));
new Float:x,Float:y,Float:z;
new arac[MAX_PLAYERS];
arac[playerid] = CreateVehicle(405,Gorev2AracSpawn[rand][0],Gorev2AracSpawn[rand][1],24.4705,55.7022,-1,-1,0);
GetVehiclePos(arac[playerid],x,y,z);
SetPlayerCheckpoint(playerid,x,y,z,5.0);
SetVehicleParamsForPlayer(arac[playerid],playerid,1,0);
CP[playerid] = 2;