GetPlayerVehicleID(playerid); not working.
#1

I'm creating a menu, so when people get in certain cars, a menu pops up saying the car is avalible to buy.
Thing is when it enter the car, no menu pops up.
Heres my code:

THIS IS MY CAR // VEHICLE ID 45.
Код:
AddStaticVehicle(562,1979.7543,2059.4924,10.4803,180.4118,92,1); // ELEGY_CARSHOP   45
THIS IS MY MENU // new Menu:Elegy; is at the top of my script, yes.
Код:
Elegy = CreateMenu("Elegy", 2, 200.0, 100.0, 300.0, 300.0);
AddMenuItem(Elegy, 0, "Buy Car");
AddMenuItem(Elegy, 1, "$85000");
AddMenuItem(Elegy, 0, "Exit");
THIS IS 'OnPlayerEnterVehicle'
Код:
if (GetPlayerVehicleID(playerid) == 45)
{
TogglePlayerControllable(playerid, 0);
ShowMenuForPlayer(Elegy, playerid);
SetCameraBehindPlayer(playerid);
}
This doesn't seem to work, and i am out of idea's why this isnt working.
Hopefully someone could point me in the correct place where i must be going wrong.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)