Vehicle entering help
#1

My problem is that when I enter the vehicle, nothing happens. Here's my code:


Код:
new nuomojamasmoto;
Код:
nuomojamasmoto = AddStaticVehicle(462,1598.0696,-2296.6885,13.1331,180.9926,1,1); // nuomojamas moto
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER && vehicleid == nuomojamasmoto)
    {
	ShowPlayerDialog(playerid,7,DIALOG_STYLE_MSGBOX,"Nuomotis","Ar norite iрsinuomoti рiа transporto priemonж uю $20?","Taip","Ne");
    }
    return 1;
}
It's supposed to show a dialog when I enter that specific vehicle, but nothing happens. Anyone knows the problem? Do I have to use the vehicle's ID instead of the one I applied?
Reply
#2

Anyone?
Reply
#3

Use OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) calback
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)