Jump to content

Sawos

Members
  • Content Count

    30
  • Joined

  • Last visited

Community Reputation

10 Decent

About Sawos

  • Rank
    Rat

Details

  • Gang
    CG:RPG

Recent Profile Visitors

730 profile views
  1. Hello there,today i bring an inventory script,as the name suggests it's an inventory to store all your items from weapons to food/repairkit ,to use an item it is easy as just pressing use within selecting the amount .It is very easy and stable and was built using SQL,hopefully it is up to standards. You still have the option to use commands : ./use weaponname amount ./use itemname ./store weaponname amount ./drop weaponname amount (need to be stored) Current Items: Food: Boosts the player's health by 10 if he's low. Repairkit: Gives the vehicle 10
  2. Well, I tought you would give me a lesson, but i will. If you leave it to "source" It won't make the player exits, cause the source element refers to the Vehicle not the player so without using The Loop to get the players it won't work, same thing with the Vehicle Loop without it, it won't dected any of the Vehicles at all : for i,player in pairs(getVehicleOccupants(source)) do setControlState(player,"enter_exit",true) and The issue was never from this Loop, cause without the loop the SetControlState won't be working plus even without both of them the issue still the
  3. Nope that's not the problem, if it was that i wouldn't post it.
  4. Hello Community, i would like to have some support here, the code works fine on this script which once the Vehicle damage is below "350", it gets Destroyed in a couple of seconds and then once the script calls this : setTimer( sec, 6000, 0 ) It doesn't spawn a single Vehicle as i wish to, it Spawns an infinate Vehicles on the same place. i just need help to make it spawn Only One. Here is the full code : function sec () local car = createVehicle ( 428, 2317.0588378906,2408.1867675781,10.8203125) setElementData(car,"sec",true) setVehicleDamageProof(car,true) end add
  5. Hello Community, i do have a script which when someone spawn the vehicle it shows up on The debug, This is the code : function spawner ( sourceplayer, commandname, carN) if not isPedInVehicle ( sourceplayer )then local x, y, z = getElementPosition ( sourceplayer ) local rx , ry, rz = getElementRotation ( sourceplayer ) local location = getZoneName ( x, y, z ) local car = createVehicle ( 434, x, y, z, rx, ry, rz) setElementData( sourceplayer, "housing", car ) warpPedIntoVehicle ( sourceplayer, car ) setElementAlpha(car, 180) triggerClientEvent("enableCollisions",sourceplayer,car) s
  6. this is really awesome man, good job for real, for How long you been coding all of this ? good luck on the sale.
  7. You should define all of 3 skills into the weapon (poor, std , pro) . and most importantly you didn't call the resource on the script starting with this : addEventHandler ( "onResourceStart", getRootElement(), stats ) and you cant remove these 2 lines unless you won't be using them in other side to trigger them : addEvent("stats",true) addEventHandler ("stats", root, stats) You're welcome
  8. function stats() weaponList = { "ak-47" } for _,weapon in ipairs( weaponList ) do for _,skill in ipairs( { "poor", "std", "pro" } ) do setWeaponProperty( weapon, skill, "maximum_clip_ammo", 1) end end end addEvent("stats",true) addEventHandler ("stats", root, stats) addEventHandler ( "onResourceStart", getRootElement(), stats )
  9. I Get No Errors/warnings but it doesn't work when i leave the vehicle, anyways thanks for the help
  10. bad argument @'getElementData' [Expected element at argument 1, got nil]
  11. Loading script failed: housingspawn\spawner.lua:34: ')' expected near ',' do i have to add the vehicle identify name ? Removed The "local" from SetElementData at the function Out and Now it shows me : attempt to concatenate a boolean value
  12. Nope, both didn't work. neither the collision thing and the destroy vehicle stopped working at all. also setElementCollisionsEnabled(car, true) a can't work with Vehicles.
  13. Yes @ShayF i have already seen that but the thing i'm still stuck at the PlayerExitVehicle thing
  14. doesn't work at all.. i literally needed some help here.. a real help Thanks
×
×
  • Create New...