Server vehicle system not working correctly.
#1

I've made a vehicle system where you can select whether it's a Rental, Faction vehicle or a Job vehicle.
However, when you enter the vehicle, nothing comes up. This is my code
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
    {
        new veh = GetPlayerVehicleID(playerid);
        if(RentalInfo[veh][isJob] >= 1)
        {
            if(PlayerInfo[playerid][JobID] == RentalInfo[veh][isJob])
            {
                SendClientMessage(playerid, COLOR_GREEN, "The company you work for owns this vehicle!");
            }
            else
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_ORANGE, "You don't have the keys!");
            }
        }
        if(RentalInfo[veh][isRental] >= 1)
        {
            ShowPlayerDialog(playerid, DIALOG_RENTAL, DIALOG_STYLE_MSGBOX, "Rental", ""COL_WHITE"This vehicle is available to rent for "COLGREEN"$200."COL_WHITE"\nDo you wish to rent this vehicle?", "Rent", "Cancel");
        }
    }
    return true;
}
Reply


Messages In This Thread
Server vehicle system not working correctly. - by BleverCastard - 22.06.2014, 17:43
Re : Server vehicle system not working correctly. - by Clad - 22.06.2014, 17:51
Re: Server vehicle system not working correctly. - by BleverCastard - 22.06.2014, 18:30
Re: Server vehicle system not working correctly. - by Clad - 22.06.2014, 18:32
Re: Server vehicle system not working correctly. - by BleverCastard - 22.06.2014, 18:33

Forum Jump:


Users browsing this thread: 1 Guest(s)