PutPlayerInVehicle does nothing
#1

Код:
if(IsValidVehicle(Player[playerid][rCar])) { DestroyVehicle(Player[playerid][rCar]); }
Pozycja = Misja[PozycjaPoStarcie];
Player[playerid][rCar] = CreateVehicle(Misja[Vehicle], Misja[Startx][Pozycja], Misja[Starty][Pozycja], Misja[Startz][Pozycja], playerid, playerid, 0,-1, 1);
				
printf("Car: %d. X: %f Y: %f Z: %f",Player[playerid][rCar],Misja[Startx][Pozycja], Misja[Starty][Pozycja], Misja[Startz][Pozycja]);
				
SetPlayerPos(playerid,Misja[Startx][Pozycja], Misja[Starty][Pozycja], Misja[Startz][Pozycja]);
				
new test = PutPlayerInVehicle(playerid,Player[playerid][rCar],0);
				
printf("test: %d",test);
This code is under OnPlayerSpawn.
The first time i spawn it's working perfectly it's creating the car and putting me in.
But after that when i kill myself and spawn again the car is being created but it's not putting me in it



// i solved this with a timer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)