Saw^^

Members
  • Content count

    28
  • Joined

  • Last visited

Community Reputation

6 Neutral

About Saw^^

  • Rank
    Advanced Member

Details

  • Gang
    SACG:RPG Owner

Recent Profile Visitors

454 profile views
  1. Saw^^

    [HELP]Spawn Vehicle Issue

    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 same. i've posted this so people could help me with an "usefull" reply with Codes. Other than that, i don't need any pointless Reply. i see ppl farming replies with non sense help. Thanks
  2. Saw^^

    [HELP]Spawn Vehicle Issue

    Nope that's not the problem, if it was that i wouldn't post it.
  3. Saw^^

    [HELP]Spawn Vehicle Issue

    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 addEventHandler("onResourceStart", resourceRoot,sec) function checkDamage(player) for _,vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if getElementData(source,"sec") then else return end if getElementHealth(source) > 350 then setVehicleDamageProof(source,false) setVehicleEngineState(source,true) else setVehicleDamageProof(source,true) setVehicleEngineState(source,false) for i,player in pairs(getVehicleOccupants(source)) do setControlState(souce,"enter_exit",true) --setTimer(respawnVehicle, 6000, 1, source) --------------------------------------------- x, y, z = getElementPosition(source) setTimer ( function() bag = createPickup( x-6, y, z, 3, 1550 ) setElementCollisionsEnabled( bag, false ) end, 4000, 1) -------------------------------------------- setTimer( destroyElement, 1000, 1, source) --setTimer( destroyElement, 50, 1, source) setTimer( sec, 6000, 0 ) end end end end addEventHandler("onVehicleDamage",getRootElement(),checkDamage)
  4. Saw^^

    [HELP] Saving into File.txt

    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) setVehiclePlateText( car, 'housing' ) setVehicleHandling(car , "maxVelocity", 40) setVehicleLocked ( car, true ) setVehicleDamageProof(car, true) local vehicleName = getVehicleName (car) triggerClientEvent ( sourceplayer, "show", sourceplayer) -- outputChatBox ( "Your vehicle is being destroyed in few Seconds due to the Abuse", sourceplayer, 255, 255, 0 ) outputDebugString ( "Housing Admin: [" ..getPlayerName(sourceplayer).."] Has Spawned "..vehicleName.." At {" ..location.."}.") setTimer ( function() destroyElement (car) end, 25000, 1 ) else outputDebugString ( "Housing Admin: [" ..getPlayerName(sourceplayer).."] Has Tried the Housing command.") end end addCommandHandler ( "spawn", spawner ) the thing i want to create is to make a txt file code into this script which writes and saves every spawn the player did like the outputDebugString. Thanks.
  5. Saw^^

    [SELL] Vice City Roleplay

    this is really awesome man, good job for real, for How long you been coding all of this ? good luck on the sale.
  6. Saw^^

    SetWeaponProperty problem

    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
  7. Saw^^

    SetWeaponProperty problem

    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 )
  8. Saw^^

    [Help] Vehicle Collision || Destroy

    I Get No Errors/warnings but it doesn't work when i leave the vehicle, anyways thanks for the help
  9. Saw^^

    [Help] Vehicle Collision || Destroy

    bad argument @'getElementData' [Expected element at argument 1, got nil]
  10. Saw^^

    [Help] Vehicle Collision || Destroy

    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
  11. Saw^^

    [Help] Vehicle Collision || Destroy

    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.
  12. Saw^^

    [Help] Vehicle Collision || Destroy

    Yes @ShayF i have already seen that but the thing i'm still stuck at the PlayerExitVehicle thing
  13. Saw^^

    [Help] Vehicle Collision || Destroy

    doesn't work at all.. i literally needed some help here.. a real help Thanks
  14. Saw^^

    [Help] Vehicle Collision || Destroy

    function colloff () local theVeh = getElementData( sourceplayer, "freecar" ) setElementCollidableWith(theVeh, sourceplayer, false) end addEvent( "test", true ) addEventHandler( "test", localPlayer, colloff ) This should work fine ? when i trigger it to server side ? bad argument @'setElementCollidableWith' [expected element at argument1, got boolean]
  15. Saw^^

    [Help] Vehicle Collision || Destroy

    I'm using the debugscript command everytime i log in. That's why i needed some help cause the debug was showing no Warnings/errors at all. Will try out what u just replied, thanks Since it's server side and setElementCollidableWith works with Client Only, do u have any idea how may i code it to client side so i can trigger it to server side, In other words, Shall i use the GetElementData on the funtcion of setElementCollidableWith (client side) !!