Jump to content

[Help]Fine script dont work


Desaster

Recommended Posts

Posted

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

Posted

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 :D

Posted

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 ??

Posted

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 ;)

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...