K4stic Posted December 4, 2012 Share Posted December 4, 2012 HI i need one more time your help Community 1. marker = createMarker ( x, y, z - 1, "cylinder", 3.5, 255, 255, 0, 170 ) blip = createBlipAttachedTo ( marker, 51 ) how make it to use one exported Attached blip and no the id? 2. givePlayerMoney ( source, 200 ) how make it if the vehicle 100% to be give that money Link to comment
Castillo Posted December 4, 2012 Share Posted December 4, 2012 By exported I guess you mean the "customblips" resource? that resource has only client side functions, and no attachment. About money thing, you can use getElementHealth to get the vehicle health. Link to comment
K4stic Posted December 4, 2012 Author Share Posted December 4, 2012 the code pls because i bad in scripting Link to comment
K4stic Posted December 4, 2012 Author Share Posted December 4, 2012 (edited) ok i make it but it's make problem at line 27 addEvent ( "del", true ) addEventHandler("del", root, function ( ) if ( not isPedInVehicle ( source ) ) then return end local vehicle = getPedOccupiedVehicle ( source ) if ( not delses [ getElementModel ( vehicle ) ] ) then return end local money = math.random ( 100, 400 ) givePlayerMoney ( source, money ) if getElementHealth(vehicle) > 990 then givePlayerMoney ( source, 50 ) outputChatBox("You get bonus for good condition!", player, 255, 0, 0, false) setElementFrozen ( vehicle, true ) setTimer ( function ( ) setElementFrozen ( vehicle, false ) end ,1000, 1 ) getNewdelLocation ( source ) end ) Edited December 4, 2012 by Guest Link to comment
Sparrow Posted December 4, 2012 Share Posted December 4, 2012 'end' missed on line 26 addEvent ( "del", true ) addEventHandler("del", root, function ( ) if ( not isPedInVehicle ( source ) ) then return end local vehicle = getPedOccupiedVehicle ( source ) if ( not delses [ getElementModel ( vehicle ) ] ) then return end local money = math.random ( 100, 400 ) givePlayerMoney ( source, money ) if getElementHealth(vehicle) > 990 then givePlayerMoney ( source, 50 ) setElementFrozen ( vehicle, true ) setTimer ( function ( ) setElementFrozen ( vehicle, false ) end ,1000, 1 ) getNewdelLocation ( source ) end end ) Link to comment
K4stic Posted December 4, 2012 Author Share Posted December 4, 2012 thx i will try it but say at line 17 i won if the vehicle 990 health and up to output the massage but if not 990 and up to not output it Link to comment
Sparrow Posted December 4, 2012 Share Posted December 4, 2012 you mean when your vehicle health egal to 990 or higher you won money? Link to comment
K4stic Posted December 4, 2012 Author Share Posted December 4, 2012 yes get money but the bonus this is code for bonus => if getElementHealth(vehicle) > 990 then givePlayerMoney ( source, 50 ) Link to comment
Sparrow Posted December 4, 2012 Share Posted December 4, 2012 that gives money to player when his vehicle health over 990 ------------ this one gives player money if his vehicle health equal or more that 990 if getElementHealth(vehicle) >= 990 then givePlayerMoney ( source, 50 ) Link to comment
K4stic Posted December 4, 2012 Author Share Posted December 4, 2012 ok local money = math.random ( 100, 400 ) givePlayerMoney ( source, money ) -- this is to get money then finnish the job if getElementHealth(vehicle) >= 990 then givePlayerMoney ( source, 50 ) -- and this is if have 990 and up vehicle health(The Bonus) Link to comment
Sparrow Posted December 4, 2012 Share Posted December 4, 2012 the first 'givePlayerMoney' gives the player random money from $100 to $400 but the second, gives the player $50 only if his vehicle health more than 990 ----------- maybe the code will not work since 'delses' on line 8 not defined. Link to comment
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