golanu21 Posted March 3, 2013 Posted March 3, 2013 function giveMoney(thePlayer) local vehicle = getPedOccupiedVehicle (thePlayer) local id = getElementModel(vehicle) if id == 431 or 437 then local gpm = getElementData(thePlayer, "buszp") if ((gpm) > 0 ) then givePlayerMoney(thePlayer, tonumber(gpm)) outputChatBox("Ai castigat " .. gpm .. "$", thePlayer, 0, 140, 240) setElementData(thePlayer, "buszp", 0) end end end addEventHandler("onVehicleExit", rootElement, giveMoney) addEventHandler("onPlayerQuit", rootElement, giveMoney) [12:45:09] WARNING: Gamemode\busjob\busjob.lua:3: Bad argument @ 'getElementModel' [Expected element at argument 1, got boolean] Ai fost angajat ca Bus Driver! [Dev]BloWnRPG - We BloW the World [1%]
Wei Posted March 3, 2013 Posted March 3, 2013 function giveMoney(thePlayer) local id = getElementModel(source) if id == 431 or 437 then local gpm = getElementData(thePlayer, "buszp") if ((gpm) > 0 ) then givePlayerMoney(thePlayer, tonumber(gpm)) outputChatBox("Ai castigat " .. gpm .. "$", thePlayer, 0, 140, 240) setElementData(thePlayer, "buszp", 0) end end end addEventHandler("onVehicleExit", rootElement, giveMoney) Diet with russian vodka, lose 3 days in one week !
K4stic Posted March 3, 2013 Posted March 3, 2013 try this function giveMoney ( thePlayer, thevehicle ) local id = getElementModel ( thevehicle ) if id == 431 or 437 then local gpm = getElementData ( thePlayer, "buszp" ) if ((gpm) > 0 ) then givePlayerMoney ( thePlayer, tonumber( gpm ) ) outputChatBox ( "Ai castigat " .. gpm .. "$", thePlayer, 0, 140, 240 ) setElementData ( thePlayer, "buszp", 0 ) end end end addEventHandler("onVehicleExit", rootElement, giveMoney) addEventHandler("onPlayerQuit", rootElement, giveMoney) Giving a Fuck? Nope, That isn't in My Skill Set
golanu21 Posted March 3, 2013 Author Posted March 3, 2013 thanx guys, you are cool [Dev]BloWnRPG - We BloW the World [1%]
K4stic Posted March 3, 2013 Posted March 3, 2013 your welcome! Giving a Fuck? Nope, That isn't in My Skill Set
Wei Posted March 3, 2013 Posted March 3, 2013 You're welcome P.S. SKIPPER you script can not work because secund parameter is seat not the vehicle. OnVehicleExit Diet with russian vodka, lose 3 days in one week !
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