Vehicle system help.
#1

Im trying to make a way so that if a car is owned and you dont own it you cannot enter it as a driver, but can enter as a passenger. My current one wont let you enter as a passenger.

Here is what ive made of the new function

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsOwnedVehicle[vehicleid] == 1)
    {
        if(strcmp(PlayerName(playerid),pCar[vehicleid][OVowner]))
        {
            if(ispassenger == 0)
            {
                SendClientMessage(playerid,COLOR_RED,"You don't own this vehicle!");
                return 0;
            }
            if(ispassenger == 1)
            {
                return 1;
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)