Viudes Posted August 11, 2017 Posted August 11, 2017 why getPedOccupiedVehicle not work? Quote function onSavePress(thePlayer) Vehicle = getPedOccupiedVehicle (thePlayer) if Vehicle then row = guiGridListAddRow (grillist) guiGridListSetItemText (grillist, row, column,getVehicleName ( Vehicle ), thePlayer, false, false ) else outputChatBox("Ei toimi") end end
AE. Posted August 11, 2017 Posted August 11, 2017 post the line where you call the function onSavePress
Viudes Posted August 11, 2017 Author Posted August 11, 2017 6 minutes ago, 3laa33 said: post the line where you call the function onSavePress function onStart() window = guiCreateWindow(0.34, 0.10, 0.15, 0.40,"Save Vehicle",true) grillist = guiCreateGridList(0.01, 0.05, 1, 0.85, true, window) vehiclename = guiCreateEdit( 0.05, 0.91, 0.5, 0.06, "", true, window) save = guiCreateButton( 0.6, 0.9, 0.4, 0.3, "Save", true, window) column = guiGridListAddColumn(grillist, "Saved vehicles", 0.85 ) guiSetVisible(window, false) addEventHandler( "onClientGUIClick",save, onSavePress) end
NeXuS™ Posted August 11, 2017 Posted August 11, 2017 (edited) function onSavePress() Vehicle = getPedOccupiedVehicle(localPlayer) if Vehicle then row = guiGridListAddRow(grillist) guiGridListSetItemText(grillist, row, column,getVehicleName(Vehicle), false, false ) else outputChatBox("Ei toimi") end end "thePlayer" doesn't exist. Edited August 11, 2017 by NeXuS™
Viudes Posted August 11, 2017 Author Posted August 11, 2017 6 minutes ago, NeXuS™ said: function onSavePress() Vehicle = getPedOccupiedVehicle(localPlayer) if Vehicle then row = guiGridListAddRow(grillist) guiGridListSetItemText(grillist, row, column,getVehicleName(Vehicle), false, false ) else outputChatBox("Ei toimi") end end "thePlayer" doesn't exist. That not work.. Still error
Viudes Posted August 11, 2017 Author Posted August 11, 2017 4 minutes ago, NeXuS™ said: Maybe write down the error... 'getPedOccuipiedVehicle' [Expected sting ped at argument 1, got sring 'left']
NeXuS™ Posted August 11, 2017 Posted August 11, 2017 Then you did not replace the script with mine... 1
Viudes Posted August 11, 2017 Author Posted August 11, 2017 4 minutes ago, NeXuS™ said: Then you did not replace the script with mine... I am so dumb omg... Thanks anyway!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now