16.07.2009, 14:09
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.
THIS IS MY MENU // new Menu:Elegy; is at the top of my script, yes.
THIS IS 'OnPlayerEnterVehicle'
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.
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
Код:
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");
Код:
if (GetPlayerVehicleID(playerid) == 45) { TogglePlayerControllable(playerid, 0); ShowMenuForPlayer(Elegy, playerid); SetCameraBehindPlayer(playerid); }
Hopefully someone could point me in the correct place where i must be going wrong.