Desaster Posted September 8, 2013 Share Posted September 8, 2013 hello it's agin me I have tryed to trigger a server event in a client resource to set wanted level but idk why it wont wor and this error appear : Bad Argument @ setPlayerWantedLevel pls help me I tryed so much thing but nothing has helped the script work just the park when your wanted level must be set to 0 is broken CODE REMOVED Link to comment
sckatchof Posted September 8, 2013 Share Posted September 8, 2013 This Is not your script, try to make your own script then we can help you ! Link to comment
Desaster Posted September 8, 2013 Author Share Posted September 8, 2013 what do you mean with that it is fully made by me Link to comment
SniperBombix95 Posted September 8, 2013 Share Posted September 8, 2013 This is the serverside script, it is not tested addEvent('onPlayerPayfine', true) addEventHandler('onPlayerPayfine', root, function(thePlayer) if( getPlayerWantedLevel( thePlayer ) > 0) then setPlayerWantedLevel( thePlayer, 0) outputChatBox( 'you have done the fine !!', thePlayer, 255, 255, 0, false ); else outputChatBox( 'An error occurred while fining !', source, 255, 0, 0, false ); end end) Let me know if it works Link to comment
Desaster Posted September 8, 2013 Author Share Posted September 8, 2013 still don't work (I tryed it also before ) but I don't know why more errors appear WARNING: c\server.lua:4: Bad argument @ 'getPlayerWantedLevel' ERROR: c\server.lua:4: attempt to compare number with boolean Hey is the triggered event right ?? Link to comment
SniperBombix95 Posted September 8, 2013 Share Posted September 8, 2013 Ok, now i see In the client side script, the triggerServerEvent is incorrect Try put this on instead of yours triggerServerEvent("onPlayerPayfine", localPlayer, localPlayer) tell me if it works, it should cause i've used it to pass at the server the player who asked to spawn a car, and it works pretty well Link to comment
Desaster Posted September 8, 2013 Author Share Posted September 8, 2013 thnx a lot it works perfectly Link to comment
Castillo Posted September 8, 2013 Share Posted September 8, 2013 This script isn't yours at all, you've copied it from another topic. Link to comment
Recommended Posts