Dzsipszi Posted March 17, 2013 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 ) KATT! http://dl.serverhive.net/
csiguusz Posted March 17, 2013 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. Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
Dzsipszi Posted March 17, 2013 Author Posted March 17, 2013 Thank you! KATT! http://dl.serverhive.net/
Anderl Posted March 17, 2013 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. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
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