Dzsipszi Posted March 17, 2013 Share Posted March 17, 2013 What is this? ERROR: Server triggered clientside event 'showBuyCar', but event is not added clientside If the car don't have owner then showBuyCar.... but the buy panel don't pop up. Script: function enterVehicle ( thePlayer, seat, jacked ) local playercar = getPedOccupiedVehicle ( thePlayer ) if ( seat == 0 ) then if ( getElementData ( playercar, "owner" ) ~= "Nobody" ) then if ( getElementData ( playercar, "owner" ) == getPlayerName ( thePlayer ) ) then outputChatBox ( "(( Ennek a járműnek a tulajdonosa: "..getElementData ( playercar, "owner" )..". ))", source, 185, 86, 185 ) else if getVehicleEngineState ( playercar ) then setVehicleEngineState ( playercar, false ) else setVehicleEngineState ( playercar, false ) end end else local price = getElementData ( playercar, "price" ) triggerClientEvent ( thePlayer, "showBuyCar", source, price ) toggleAllControls ( thePlayer, false, true, false ) return true end end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) Link to comment
csiguusz Posted March 17, 2013 Share Posted March 17, 2013 You want to trigger a client-sided event named "showBuyCar" (on line 16), but it's not added on client-side with addEvent. Link to comment
Anderl Posted March 17, 2013 Share Posted March 17, 2013 You want to trigger a client-sided event named "showBuyCar" (on line 16), but it's not added on client-side with addEvent. Not really, he could simply have made the mistake of adding the server side script before the client side one in the 'meta.xml' file. Link to comment
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