OnPlayerStateChange statement ain't working
#6

Quote:
Originally Posted by [CG]Milito
Посмотреть сообщение
Nope.
I'm trying to get vehicle coords by checking if it's an owned vehicle
To check if its owned I use the validcar variable.
Then if it's valid (Owned vehicle) save the coords into CarInfo vars
Try using this OnPlayerExitVehicle, Then it may work.

Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
		new vehid = LastVehicle[playerid];
        if(validcar[vehid])
        {
            GetVehiclePos(vehid,CarInfo[vehid][cXPos],CarInfo[vehid][cYPos],CarInfo[vehid][cZPos]);
            printf("%f, %f, %f",CarInfo[vehid][cXPos],CarInfo[vehid][cYPos],CarInfo[vehid][cZPos]);
        }
        LastVehicle[playerid]= INVALID_VEHICLE_ID;
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)