Jump to content

DonOmar

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by DonOmar

  1. Hello guys today iam requesting a small code to plus admin hp +5 every 3 seconds is there anyone can help with this code ?
  2. DonOmar

    notfixed.

    iam not Owner iam Co and learning Lua
  3. DonOmar

    notfixed.

    tell me dude if u can
  4. DonOmar

    notfixed.

    lel tell me how
  5. ok look at this i made the glue system in server side but when a player is trying to glue on my car he can't . just me can glue on my car. here is the code function gluePlayer(player, slot, vehicle, x, y, z, rotX, rotY, rotZ) attachElements(player, vehicle, x, y, z + 0.16, rotX, rotY, rotZ) setPedWeaponSlot(player, slot) setElementData(player, "gluedYe", true) end function unglue(source, key, state) detachElements(source) setElementData(source, "gluedYe", false) end function glue(_, element) if not getPedOccupiedVehicle(source) then local owner = getElementData(element, "Owner") local gmate = getElementData(source, "g") local gmate2 = getElementData(owner, "g") local smate = getElementData(source, "s") local smate2 = getElementData(owner, "s") if (getElementData(vehicle, "locked") == true) and not (owner == source) or not (gmate == gmate2) or not (smate == smate2) then exports.CIThelp:displayAttachedHelp(0, 0, 1, vehicle, "Vehicle is locked by the owner only group/squad members can glue to it", 1, 255, 0, 0, 180, 5000) return elseif getElementType(element) == "vehicle" then --and getElementData(source, "CIFvip") == true or (getTeamName(getPlayerTeam(source)) == "Staff") then local px, py, pz = getElementPosition(source) local vx, vy, vz = getElementPosition(element) local sx = px - vx local sy = py - vy local sz = pz - vz local rotpX = 0 local rotpY = 0 local rotpZ = getPedRotation(source) local rotvX,rotvY,rotvZ = getElementRotation(element) local t = math.rad(rotvX) local p = math.rad(rotvY) local f = math.rad(rotvZ) local ct = math.cos(t) local st = math.sin(t) local cp = math.cos(p) local sp = math.sin(p) local cf = math.cos(f) local sf = math.sin(f) local z = ct*cp*sz + (sf*st*cp + cf*sp)*sx + (-cf*st*cp + sf*sp)*sy local x = -ct*sp*sz + (-sf*st*sp + cf*cp)*sx + (cf*st*sp + sf*cp)*sy local y = st*sz - sf*ct*sx + cf*ct*sy local rotX = rotpX - rotvX local rotY = rotpY - rotvY local rotZ = rotpZ - rotvZ local slot = getPedWeaponSlot(source) gluePlayer(source, slot, element, x, y, z, rotX, rotY, rotZ) bindKey(source,"jump","down",unglue) bindKey(source,"w","down",unglue) bindKey(source,"a","down",unglue) bindKey(source,"s","down",unglue) bindKey(source,"d","down",unglue) end end end addEventHandler("onPlayerContact", root, glue)
  6. DonOmar

    Fixed

    i don't wanna anyone to take my code just it.
  7. i respect him he is helping me alot too buy i mean u Understood me and Codyl didnt just what i mean
  8. LOL Codyl Learn From Walid he just said 1 word to help me .
  9. the script is not made by me so i can't change it to Server side
  10. Pffffffff i want to make player glue when touching a vehicle.
  11. Omg iam asking for help in the client side u could help me or no ?
  12. DonOmar

    help

    Dude thank you for ur help and u don't know that CIF firstly was COR then CRP then became CIF just it it's our scripts and thank you for ur much help.
  13. DonOmar

    help

    also i added it and its not working
  14. DonOmar

    help

    where shoud i put this Line ?
  15. hello guys today, i'am asking for improving my code to make enable using the command with just a Group in acl ! i made it but it failed here is the code. Amount = { }; Amount.RED = { 255, 0, 0 }; Amount.BLUE = { 1, 1, 1 }; Amount.PINK = { 2, 2, 2 }; Amount.BLACK = { 0, 0, 0 }; function clr (player,command,color) local vehicle = getPedOccupiedVehicle(player) if color and vehicle then if ( not Amount [ tostring ( color ):upper ( ) ] ) then return false; end local r, g, b = unpack ( Amount [ tostring ( color ):upper() ] ); setVehicleColor(vehicle, r, g, b ); end end addCommandHandler("color", clr)
×
×
  • Create New...