TorNix~|nR

Members
  • Content count

    431
  • Joined

  • Last visited

Community Reputation

17 Decent

7 Followers

About TorNix~|nR

  • Rank
    Thug
  • Birthday 03/09/1998

Details

  • Gang
    LOS SANTOS
  • Location
    Tunisia
  • Occupation
    LOS SANTOS Zombie Owner

Recent Profile Visitors

2,577 profile views
  1. scoreboard flag

    Try to download the simple dx scoreboard from the community and make sure the admin panel file is named admin inside [admin] Like I told you, the code I gave you is working, try and tell me
  2. scoreboard flag

    Use /debugscript 3, and tell us Use this server-side on your script function showcountry() local flag = exports.admin:getPlayerCountry ( source ) if flag then setElementData(source,"Country",":admin/client/images/flags/"..flag..".png") else flag = "N/A" end end addEventHandler("onPlayerJoin",getRootElement(),showcountry) add it on admin panel, use resource."yourfoldername" and use this scoreboard code elseif column.name == "Country" then dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) That should 100% work, because I tested it PS: do not forget to add this on scoreboard exports { ["name"] = "Country", ["width"] = 16, ["friendlyName"] = "Country", ["priority"] = 1 }, --add your placement instead of "1" Tell me if you got a problem
  3. Safe zone

    what should I add?
  4. Safe zone

    Hello guys, I have my script, a safe zone when a player enters the safe zone, of course he can't kill players, but the problem is that all the damage are disabled he have like a godmode EXAMPLE: when a players falls from a long distance, he never get damaged, I want to disable this I want the player get damaged, but not from players help me please Client side addEventHandler( 'onClientPlayerDamage', localPlayer, function(attacker) if getElementData(attacker,"dd") == true then return end if getElementData( localPlayer, 'damage' ) == 'no' then cancelEvent( ) end end )
  5. Fuel system

    Thank you so much @DNL291, I really appreciate it
  6. Fuel system

    Guys, I can't do it, please help me this is my full code Client side -- Some stats local isPumping = false local fuelPrice = 5 local currentMarker local doEventHandlers -- When the player enters a vehicle addEventHandler ( "onClientVehicleEnter", root, function ( thePlayer, seat ) if ( thePlayer == localPlayer ) and ( seat == 0 ) then if ( fuelTimer ) and ( isTimer( fuelTimer ) ) then killTimer( fuelTimer ) end if not ( getElementData ( source, "vehicleFuel" ) ) then setElementData ( source, "vehicleFuel", 100 ) elseif ( getElementData ( source, "vehicleFuel" ) <= 0 ) then disableVehicleFunctions( source ) else enableVehicleFunctions( source ) end if ( doEventHandlers ) then addEventHandler ( "onClientVehicleExit", source, onVehicleExitDestroy, false ) addEventHandler ( "onClientElementDestroy", source, onVehicleExitDestroy, false ) doEventHandlers = false end fuelTimer = setTimer ( onDecreaseFuel, 7000, 0 ) end end ) -- Disable all vehicle functions whenever the vehicle has no fuel left function disableVehicleFunctions ( theVehicle ) if ( fuelTimer ) and ( isTimer( fuelTimer ) ) then killTimer( fuelTimer ) end setVehicleEngineState( theVehicle, false ) toggleControl ( "accelerate", false ) toggleControl ( "brake_reverse", false ) outputChatBox( "This vehicle has stopped fuel, call a mechanic to refuel!", 0, 225, 0 ) end -- Enable the vehicle functions again function enableVehicleFunctions( theVehicle ) setVehicleEngineState( theVehicle, true ) toggleControl ( "accelerate", true ) toggleControl ( "brake_reverse", true ) end -- When the resource starts addEventHandler ( "onClientResourceStart", resourceRoot, function () if ( getPedOccupiedVehicle ( localPlayer ) ) and ( getVehicleOccupant ( getPedOccupiedVehicle ( localPlayer ), 0 ) == localPlayer ) then doEventHandlers = true local theVehicle = getPedOccupiedVehicle ( localPlayer ) if not ( getElementData ( theVehicle, "vehicleFuel" ) ) then setElementData ( theVehicle, "vehicleFuel", 100 ) elseif ( getElementData ( theVehicle, "vehicleFuel" ) <= 0 ) then disableVehicleFunctions( theVehicle ) end if ( doEventHandlers ) then addEventHandler ( "onClientVehicleExit", root, onVehicleExitDestroy, false ) addEventHandler ( "onClientElementDestroy", root, onVehicleExitDestroy, false ) doEventHandlers = false end fuelTimer = setTimer ( onDecreaseFuel, 5000, 0 ) end end ) -- Function when a vehicle gets destroyed or when a player exit the vehicle function onVehicleExitDestroy ( theVehicle ) local theVehicle = theVehicle or source if ( fuelTimer ) and ( isTimer( fuelTimer ) ) then killTimer( fuelTimer ) end if ( getElementData ( theVehicle, "vehicleFuel" ) ) then setElementData ( theVehicle, "vehicleFuel", getElementData ( theVehicle, "vehicleFuel" ) ) end unbindKey ( "K", "down", onRefuelVehicle ) unbindKey ( "K", "up", onStopRefuelVehicle ) isPumping = false if ( theVehicle ) then removeEventHandler ( "onClientVehicleExit", theVehicle, onVehicleExitDestroy, false ) removeEventHandler ( "onClientElementDestroy", theVehicle, onVehicleExitDestroy, false ) doEventHandlers = true end end -- When the resource gets stopped addEventHandler ( "onClientResourceStop", resourceRoot, function () if ( getPedOccupiedVehicle ( localPlayer ) ) and ( getVehicleOccupant ( getPedOccupiedVehicle ( localPlayer ), 0 ) == localPlayer ) then onVehicleExitDestroy ( getPedOccupiedVehicle ( localPlayer ) ) end end ) -- Function that decreases the fuel function onDecreaseFuel () local theVehicle = getPedOccupiedVehicle ( localPlayer ) if ( theVehicle ) then local theFuel = getElementData ( theVehicle, "vehicleFuel" ) if ( theFuel ) and not ( isPumping ) and ( getVehicleEngineState ( theVehicle ) ) and ( theFuel > 0 ) and ( getVehicleOccupant ( getPedOccupiedVehicle ( localPlayer ), 0 ) == localPlayer ) then setElementData ( theVehicle, "vehicleFuel", theFuel - 1 ) if ( getElementData ( theVehicle, "vehicleFuel" ) <= 0 ) then disableVehicleFunctions( theVehicle ) end end end end -- Get the vehicle speed function getVehicleSpeed ( theVehicle, unit ) if ( unit == nil ) then unit = 0 end if ( isElement( theVehicle ) ) then local x,y,z = getElementVelocity( theVehicle ) if ( unit=="mph" or unit==1 or unit =='1' ) then return ( x^2 + y^2 + z^2 ) ^ 0.5 * 100 else return ( x^2 + y^2 + z^2 ) ^ 0.5 * 1.61 * 100 end else return false end end -- When the player hits a fuel marker function onFuelPumpMarkerHit ( hitElement, matchingDimension, theMarker ) local theMarker = theMarker or source if ( hitElement ) and ( getElementType ( hitElement ) == "player" ) and ( matchingDimension ) and ( getPedOccupiedVehicle( hitElement ) ) and ( isFuelMarker ( theMarker ) ) and ( getVehicleController( getPedOccupiedVehicle( hitElement ) ) == localPlayer ) then local theVehicle = getPedOccupiedVehicle( hitElement ) if ( getElementData( theVehicle, "vehicleFuel" ) >= 100 ) then outputChatBox ( "Your vehicle has enough fuel!", 225, 0, 0 ) else currentMarker = theMarker bindKey ( "K", "down", onRefuelVehicle ) outputChatBox ( "Press 'K' if you want to refuel.", 0, 255, 0 ) end end end -- When the player hits a fuel marker function onFuelPumpMarkerLeave ( hitElement, matchingDimension ) if ( hitElement == localPlayer ) then unbindKey ( "K", "down", onRefuelVehicle ) unbindKey ( "K", "up", onStopRefuelVehicle ) isPumping = false end end -- When the player press the space button to refuell function onRefuelVehicle () if ( getPedOccupiedVehicle( localPlayer ) ) then local theVehicle = getPedOccupiedVehicle( localPlayer ) setElementFrozen ( theVehicle, true ) if ( getVehicleSpeed ( theVehicle, "kmh" ) >= 1 ) then outputChatBox ( "Please bring the vehicle to a complete stop!", 225, 0, 0 ) elseif ( getPlayerMoney() < fuelPrice ) then outputChatBox ( "You do not have enough money, the price is $" .. fuelPrice .." per litre!", 255, 0, 0 ) else local oldFuel = math.floor( getElementData ( theVehicle, "vehicleFuel" ) ) setTimer ( onRefillVehicle, 250, 1, theVehicle, oldFuel ) outputChatBox ( "Your vehicle is being filled, please wait...", 0, 255, 0 ) isPumping = true unbindKey ( "K", "down", onRefuelVehicle ) bindKey ( "K", "up", onStopRefuelVehicle ) end else onStopRefuelVehicle () end end -- Actualy refill the vehicle function onRefillVehicle( theVehicle, oldFuel, price ) if ( theVehicle ) and ( oldFuel ) then local theFuel = tonumber( oldFuel ) local thePrice = tonumber( price ) or 0 if not ( getKeyState ( "K" ) ) then onStopRefuelVehicle ( theFuel, thePrice, theVehicle ) elseif ( getPlayerMoney() < fuelPrice ) and not ( getElementData( theVehicle, "vehicleOccupation" ) ) then outputChatBox ( "You do not have enough money to continue, the price is $" .. fuelPrice .." per litre!", 255, 0, 0 ) onStopRefuelVehicle ( theFuel, thePrice, theVehicle ) elseif ( oldFuel >= 100 ) then onStopRefuelVehicle ( theFuel, thePrice, theVehicle ) else theFuel = math.floor( theFuel + 1 ) thePrice = math.floor( thePrice + 5 ) setTimer ( onRefillVehicle, 250, 1, theVehicle, theFuel, thePrice ) setElementData ( theVehicle, "vehicleFuel", theFuel ) end end end -- When the player stops pressing space or stop fuel function onStopRefuelVehicle ( theFuel, thePrice, theVehicle ) unbindKey ( "K", "up", onStopRefuelVehicle ) isPumping = false local theVehicle = getPedOccupiedVehicle( localPlayer ) local newFreezeStatus = not currentFreezeStatus setElementFrozen ( theVehicle, false ) if ( theFuel ) and ( thePrice ) and not ( tostring( theFuel ) == "space" ) then if ( tonumber( theFuel ) < 100 ) then bindKey ( "K", "down", onRefuelVehicle ) outputChatBox ( "Press 'K' if you want to refuel more.", 225, 0, 0 ) end if ( theVehicle ) and ( getElementData( theVehicle, "vehicleOccupation" ) ) then outputChatBox ( "The company, he works for pays its fuel, lucky bastard.", 0, 255, 0 ) else triggerServerEvent ( "onPlayerPaymentFuel", localPlayer, thePrice ) if ( thePrice ) then outputChatBox ( "You paid $" .. thePrice .. " for recharging!", 0, 255, 0 ) end end end end Server side -- Event that let the drive pay for the refueling addEvent ( "onPlayerPaymentFuel", true ) addEventHandler ( "onPlayerPaymentFuel", root, function ( thePrice ) takePlayerMoney ( source, thePrice ) end ) -- Exports to set vehicle fuel function setVehicleFuel ( theVehicle, theFuel ) if ( theVehicle ) and ( isElement( theVehicle ) ) and ( theFuel ) then setElementData ( theVehicle, "vehicleFuel", theFuel ) return true else return false end end -- Exports to get vehicle fuel function getVehicleFuel ( theVehicle ) if ( theVehicle ) and ( isElement( theVehicle ) ) then return getElementData ( theVehicle, "vehicleFuel" ) else return false end end Help me please guys
  7. Fuel system

    Didn't work, I even used this if getVehicleType(source) ~= 'BMX' and getVehicleType(source) ~= 'Bike' and getVehicleType(source) ~= 'Mountain Bike' and getVehicleType(source) ~= 'Quad' then return end and it's the same, help please?
  8. Fuel system

    Hey guys, please can anyone help me? my fuelsystem I want to disable the bikes on fuelsystem bike ids: 510, 509, 481 help me please Server-Side -- Event that let the drive pay for the refueling addEvent ( "onPlayerPaymentFuel", true ) addEventHandler ( "onPlayerPaymentFuel", root, function ( thePrice ) takePlayerMoney ( source, thePrice ) end ) -- Exports to set vehicle fuel function setVehicleFuel ( theVehicle, theFuel ) if ( theVehicle ) and ( isElement( theVehicle ) ) and ( theFuel ) then setElementData ( theVehicle, "vehicleFuel", theFuel ) return true else return false end end -- Exports to get vehicle fuel function getVehicleFuel ( theVehicle ) if ( theVehicle ) and ( isElement( theVehicle ) ) then return getElementData ( theVehicle, "vehicleFuel" ) else return false end end
  9. onColShapeHit

    It start destroying zombies, I think I give up Thank you so much ^^
  10. onColShapeHit

    the zombies have their script, of @Slothman https://community.multitheftauto.com/index.php?p=resources&s=details&id=347
  11. onColShapeHit

    I'm using slothbot only for boss script, but the zombies are without slothbot Before this post, I sent you a wrong script, here it is the working one, if you want try it, you will see a green map on F11, sorry for taking your time. local aSavePlaces = { Circle = { -- x, y, radius }, Cuboid = { -- x, y, z, Width, Depth, Height }, Rectangle = { -- X, Y, Width, Height { 1155.28, -1350.23, 65, 58, 0, 255, 0, 0 }, }, Sphere = { -- X, Y, Z, Radius }, Tube = { -- X, Y, Z, Radius, Height }, Polygon = { -- X, Y, X1, Y1, X2, Y2, X3, Y3, ... -- You can add like X4, Y4 .. } } local aRadarAreaPlaces = { { 1155.28, -1350.23, 65, 58, 0, 255, 0, 70 }, } local sResourceName = getResourceName ( resource ) local bUseGunsInSavePlace = get( sResourceName .. '.UseGunsInSaveZone' ) local bUseRadarArea = get( sResourceName .. '.UseRadarArea' ) local pColshape, pRadarArea local bUseRunInSaveZone = get( sResourceName .. '.UseRunInSaveZone' ) local bUseJumpInSaveZone = get( sResourceName .. '.UseJumpInSaveZone' ) local bUseWeaponHudInSaveZone = get( sResourceName .. '.UseWeaponHudInSaveZone' ) local bUseAmmoHudInSaveZone = get( sResourceName .. '.UseAmmoHudInSaveZone' ) local bUseDamageInSaveZone = get( sResourceName .. '.UseDamageInSaveZone' ) addEventHandler ( 'onResourceStart', resourceRoot, function ( ) local display = textCreateDisplay () local text = textCreateTextItem("", 0.15, 0.53, "high", 150, 0, 0, 255, 2, "right", "bottom") textDisplayAddText(display, text) for s, _ in pairs( aSavePlaces ) do for _, a in pairs( aSavePlaces[ s ] ) do pColshape = _G[ 'createCol' .. s ]( unpack( a ) ) setElementData( pColshape, 'zombieProof', false ) addEventHandler ( 'onColShapeHit', pColshape, function ( pHitElement, ped ) triggerClientEvent (pHitElement, "welcome88", pHitElement) triggerClientEvent (pHitElement, "yes1", pHitElement) if getElementType( pHitElement ) == 'player' then if getElementData(pHitElement,"boss") ~= true then textDisplayAddObserver(display, pHitElement) if not bUseGunsInSavePlace then end if not bUseDamageInSaveZone then setElementData( pHitElement, 'damage', 'no' ) end end elseif getElementType( pHitElement ) == 'ped' then -- check if the entered ped kill it local aa = getElementData(pHitElement, "zombie") if getElementData(pHitElement, "zombie") then if getElementData(pHitElement,"boss") ~= true then destroyElement(pHitElement, aa) end end-- end-- end-- ) addEventHandler ( 'onColShapeLeave', pColshape, function ( pLeaveElement ) triggerClientEvent (pLeaveElement, "fail88", pLeaveElement) triggerClientEvent (pLeaveElement, "no1", pLeaveElement) if getElementType( pLeaveElement ) == 'player' then textDisplayRemoveObserver(display, pLeaveElement) if not bUseGunsInSavePlace then end if not bUseDamageInSaveZone then setElementData( pLeaveElement, 'damage', 'yes' ) end elseif getElementType( pLeaveElement ) == 'ped' then -- check if the entered ped kill it end end ) end end if bUseRadarArea then for _, a in ipairs( aRadarAreaPlaces ) do pRadarArea = createRadarArea ( unpack( a ) ) setElementData( pRadarArea, 'zombieProof', true ) end end end )
  12. onColShapeHit

    false script
  13. onColShapeHit

    Still the same, when I am inside the safe zone, the zombies spawn
  14. onColShapeHit

    yes, when a player enter to the safe zone, kill all the zombies (like the zombies who are coming to him) when I am in safe zone, the zombies come, they annoy, but they get killed if they join the safe zone so the point is, I will if a player enter the safe zone, kill the zombies
  15. onColShapeHit

    Hello guys, I have this little problem, it makes me crazy I already set when a zombie enter to the safe zone, he will disappear (destroyElement) I want to make when the player enter to the safe zone, any zombies disappear, any help please? addEventHandler ( 'onColShapeHit', pColshape, function ( pHitElement, ped ) if getElementType( pHitElement ) == 'player' then if getElementData(pHitElement,"boss") ~= true then textDisplayAddObserver(display, pHitElement) if not bUseGunsInSavePlace then end if not bUseDamageInSaveZone then setElementData( pHitElement, 'damage', 'no' ) end end elseif getElementType( pHitElement ) == 'ped' then -- check if the entered ped kill it local aa = getElementData(pHitElement, "zombie") if getElementData(pHitElement, "zombie") then if getElementData(pHitElement,"boss") ~= true then destroyElement(pHitElement, aa) -- THIS ONE DISAPPEAR THE ZOMBIE WHEN JOIN THE SAFE ZONE end end-- end-- end-- )