eehm got little problem with onentercar
#1

hey guys,
i have made this kind of dialog that when a player enters a car they get a little dialog msg box which says that they have to pay road tax to drive on the roads and it works fine but now i found a little bugg and i dont know how to fix it...
everytime u enter a car u get a dialog which says if u want to pay or not pay and that part is working fine but then when ur driving or walking and someone else gets in a car then he gets the dialog too but the one who is walking gets it too... how can i make it that only the player who enters the car gets the dialog and not everyone when 1 player enters a car...
this are my codes:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SetTimer("CarDialog", 3000, false);
    return 1;
}
public CarDialog(playerid)
{
    ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_MSGBOX, "Car Tax", "to drive this vehicle you have to pay $10000 for the Road Tax!", "Pay", "Don't Pay");
    return 1;
}
pawn Код:
if(dialogid == 12345){
        if(response){
        GivePlayerMoney(playerid, -10000);
        }
        else{
            RemovePlayerFromVehicle(playerid);
        }
    }
eehm can someone help me pls
niels
Reply


Messages In This Thread
eehm got little problem with onentercar - by niels44 - 02.01.2012, 18:19
Re: eehm got little problem with onentercar - by Jakku - 02.01.2012, 18:24
Re: eehm got little problem with onentercar - by niels44 - 02.01.2012, 18:33
Re: eehm got little problem with onentercar - by Jakku - 02.01.2012, 18:35

Forum Jump:


Users browsing this thread: 1 Guest(s)