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
#2

Get your own help from this
Reply
#3

Lol, not even. Did you read the post above? Stop trying to be smart, if you've got nothing good to write, don't write it.
Reply
#4

Quote:
Originally Posted by BleverCastard
Посмотреть сообщение
Lol, not even. Did you read the post above? Stop trying to be smart, if you've got nothing good to write, don't write it.
Yes I did, The wiki gives you an idea about how you do it, or you was expecting that I give you а full code and you copy paste ?
Reply
#5

Oi, smartass, you clearly didn't.
pawn Код:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
This isn't what I was asking about.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)