Chlorek Posted June 19, 2011 Share Posted June 19, 2011 Hi again. I am scripting something to mta community but I met problems again So I have: function omgmode() local kierowca = getLocalPlayer() local siedzenie = getPedOccupiedVehicleSeat(kierowca) if(getPlayerMoney(kierowca) >= 15000)then if(getPedOccupiedVehicle(kierowca))then if(tonumber(siedzenie) == 0)then triggerServerEvent ("omgModeEvent", getLocalPlayer(), kierowca) else outputChatBox("You must be a driver!", kierowca, 255, 0, 0) end else outputChatBox("You must be in a vehicle!", kierowca, 255, 0, 0) end else outputChatBox("You need 15000$ to buy an OMG-Mode!", kierowca, 255, 0, 0) end end addCommandHandler ( "omg", omgmode) So, in this function is triggeing server event and it doesn't work. But problem isn't at server side... it's in this function bcuz triggerServerEvent is not started. Why? I don't get any errors in the console and no texts on the chat? Please help... I am makin this shi.t 2 hours -,- Thanks for help! Link to comment
Arran Posted June 19, 2011 Share Posted June 19, 2011 Do /debugscript 3 when scripting Then you will notice that getPedOccupiedVehicleSeat is server side only (it doesn't work client side) if you had debugscript on then you will see an error. 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