OnPlayerEnterVehicle problem
#1

FIXED
Reply
#2

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(ispassenger)
	{
		if(!IsVehicleOccupied(vehicleid))
		{
    			SendClientMessage(playerid, COLOR_RED, "Don't enter a vehicle without driver.");
    			return ClearAnimations(playerid);
		}
	}
	return 1;
}
ClearAnimations is better solution, don't need to get/set player position.
Reply
#3

What's your IsVehicleOccupied code?
Reply
#4

Код:
stock IsVehicleOccupied(vehicleid)
{
    for(new i =0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInVehicle(i,vehicleid))
        {
            return 1;
        }
    }
	return 0;
}
Reply
#5

bump

not working
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)