Jump to content

Speed contol system


SkatCh

Recommended Posts

hi guys please i need some help i'm trying to create a speed control system but i think that i have some thing wrong.

just a part from my script :

function speedCam( thePlayer ) 
local level = getPlayerWantedLevel ( thePlayer ) <--- this line 
local veh = getPlayerOccupiedVehicle( thePlayer ) <--- and this 
local fine = math.random(50,100) 
if (getElementSpeed(veh,"kph") > 140) and (getPlayerMoney( thePlayer ) > (fine)) then 
takePlayerMoney(thePlayer,fine) 
outputChatBox("A Speed Cam has captured you driving on "..(math.floor(getElementSpeed(veh))).."KM/H, A fine of $"..fine.." has been taken from you.(LIMIT:140KM/H)",thePlayer,255,255,255) 

warnings :

bad argument @ 'getPlayerWantedLevel' [Expected player at argument 1, got marker]

bad argument@ 'getPlayerOccupiedVehicle' [Expected ped at argument 1 , got vehicle]

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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