SkatCh Posted August 24, 2014 Posted August 24, 2014 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] Failure is simply an opportunity to begin again more intelligently - Henry Ford
bandi94 Posted August 24, 2014 Posted August 24, 2014 Well it say's clear that "thePlayer" argument it's a marker / vehicle and not a Ped / Player. Post the full code , the error is in the line where you call speedCam() function. Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
Et-win Posted August 24, 2014 Posted August 24, 2014 Change event 'onMarkerHit' to 'onPlayerMarkerHit'. Then, change all 'thePlayer''s to 'source'. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
SkatCh Posted August 24, 2014 Author Posted August 24, 2014 didn't work Failure is simply an opportunity to begin again more intelligently - Henry Ford
Et-win Posted August 24, 2014 Posted August 24, 2014 Put the new script. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
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