Jump to content

Jacobob14

Members
  • Posts

    266
  • Joined

  • Last visited

Everything posted by Jacobob14

  1. does not work does not change color: (
  2. I'm doing a custom crosshair and my problem is that I want when point to a ped the color of crosshair change orgive my bad English if (getElementType(getPedTarget(localPlayer))== "vehicle" ) then local color= "255,0,0" else color = "0,0,0" end local hX,hY,hZ = getPedTargetEnd ( getLocalPlayer() ) local screenX1, screenY1 = getScreenFromWorldPosition ( hX,hY,hZ ) dxDrawLine(screenX1-(size/6), screenY1-(size/6), screenX1, screenY1, tocolor(color,255))
  3. as I can make the door can not be opened or closed if moving help pliz ;( local objeto5 = createObject ( 6959, -2038.5999755859, -81.400001525879, 90, 0, 90, 90 ) local objeto6 = createObject ( 6959, -2074.8999023438, -81.400001525879, 90, 0, 90, 90 ) local state1 = false function Funcion ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "|FEDG|" ) ) then if ( not state1 ) then moveObject ( objeto5, 2000, -2038.5999755859, -81.400001525879, 110, 0, 0, 0) state1 = true moveObject ( objeto6, 2000, -2074.8999023438, -81.400001525879, 110, 0, 0, 0) state1 = true outputChatBox ( "#0000ff[base FEDG] => #ffffffAbriendo #00ff00Aereo", thePlayer, 255, 255, 255, true ) else moveObject ( objeto5, 2000, -2038.5999755859, -81.400001525879, 90, 0, 0, 0) state1 = false moveObject ( objeto6, 2000, -2074.8999023438, -81.400001525879, 90, 0, 0, 0) state1 = false outputChatBox ( "#0000ff[base FEDG] => #ffffffCerrando #ff0000Aereo", thePlayer, 255, 255, 255, true ) end else outputChatBox ( "No perteneces al clan FEDG", thePlayer, 255, 0, 0, true ) end end addCommandHandler ( "fedgaereo", Funcion )
  4. I'm trying to make the zombies have different animations depending on the skin that have but does not work me any help plis ZombieLimit = get("zombies.MaxZombies")- ZombieStreaming = get("zombies.StreamMethod") ZombiePedSkins = {60, 61, 62, 63, 64, 67, 66, 78, 79, 80, 81 } local id = getElementModel (ped, "zombie" ) if id == 60 then chaseanim = "WALK_drunk" checkspeed = 2000 elseif id== 61 then chaseanim = "WALK_player" checkspeed = 1000 elseif id == 62 then chaseanim = "run_civi" checkspeed = 1000 else chaseanim = "run_old" checkspeed = 1000 end
  5. the Players do not kill each other to the enter the area
  6. I want that when players enter the area they can not kill but does not work consesionaria = createColRectangle ( 2194.671875, 429.2763671875, 18.957292556763, 300, 210 ) safeZoneRadar1 = createRadarArea ( 2194.671875, 429.2763671875, 300, 210, 0, 187, 255, 155 ) setElementData (safeZoneRadar1, "zombieProof", true) addEventHandler ( "onColShapeHit", consesionaria, function ( hitElement, matchingDimension ) if getElementType(hitElement) == "player" then toggleControl (hitElement, "fire", true ) toggleControl (hitElement, "aim_weapon", true) toggleControl (hitElement, "vehicle_fire", false) end end ) addEventHandler ( "onColShapeLeave", consesionaria, function ( leaveElement, matchingDimension ) if getElementType(leaveElement) == "player" then toggleControl (leaveElement, "fire", true ) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) end end )
  7. Jacobob14

    help pliz

    what is the problem I get this error http://prntscr.com/3q2p3x client function buy () triggerServerEvent("buycar", localPlayer) end addEventHandler("onClientGUIClick", comprar, buy) server function buycar( source) if isPedInVehicle(source) then local vehicle = getPedOccupiedVehicle( source ) if ( getPlayerMoney(source) >= getElemetData(vehicle,"price")) then local sx, sy, sz = getElementPosition( source ) local rx, ry, rz = getElementRotation ( source ) local id = getElementID( vehicle ) local r1, g1, b1, r2, g2, b2 = getVehicleColor (vehicle) local userr =getAccountName( getPlayerAccount (source) ) if vehicles[id] then vehicles[id]["x"] = sx vehicles[id]["y"] = sy vehicles[id]["z"] = sz vehicles[id]["rotX"] = rx vehicles[id]["rotY"] = ry vehicles[id]["rotZ"] = rz vehicles[id]["r"] = r vehicles[id]["g"] = g vehicles[id]["b"] = b vehicles[id]["sr"] = r2 vehicles[id]["sg"] = g2 vehicles[id]["sb"] = b2 vehicles[id]["ptype"] = "user" vehicles[id]["owner"] = userr vehicles[id]["model"] = "411" setVehicleDamageProof(vehicle, true) setVehicleColor(vehicle, 255,255,0) setElementFrozen ( vehicle, false ) fromCacheToXML() end else outputChatBox("Error 5674: Dinero Insuficiente", source, 250,230,0) end end end addEvent ( "buycar", true ) addEventHandler ( "buycar", root, buycar)
  8. I want to get this part of xml owner="raul15"
  9. as I can find the id Part of owner are stored here xml "ads" model ="411" x="216.7294921875" y="1913.1904296875" z="17.640625" rotX="0" rotY="0" rotZ="187.1082611084" ptype="con" owner="raul15" damage="false" r="0" g="0" b="0" sr="0" sg="0" sb="0"/> function drawPanel() local theVehicle = getPedOccupiedVehicle (localPlayer) local name =getVehicleName ( theVehicle ) local owner = getElementID(theVehicle) -- only give the id : ( end
  10. I have this system and I need a function to change the owner of the vehicle function getVehicleFromID ( ID ) for id, i in ipairs (getElementsByType( "vehicle" )) do if getElementID (i) == ID then return i end end end vehicles = {} function vehiclesCache () vehicles = {} for k, i in pairs (xmlNodeGetChildren( xmlLoadFile( "scripts/vehicles.xml" ) )) do vehicles[xmlNodeGetAttribute ( i, "id" )] = { id = xmlNodeGetAttribute ( i, "id" ), model = xmlNodeGetAttribute ( i, "model" ), x = xmlNodeGetAttribute ( i, "x" ), y = xmlNodeGetAttribute ( i, "y" ),z = xmlNodeGetAttribute ( i, "z" ),rotX = xmlNodeGetAttribute ( i, "rotX" ),rotY = xmlNodeGetAttribute ( i, "rotY" ),rotZ = xmlNodeGetAttribute ( i, "rotZ" ),ptype = xmlNodeGetAttribute ( i, "ptype" ), owner = xmlNodeGetAttribute ( i, "owner" ), damage = xmlNodeGetAttribute ( i, "damage" ), r = xmlNodeGetAttribute ( i, "r" ), g = xmlNodeGetAttribute ( i, "g" ), b = xmlNodeGetAttribute ( i, "b" ), sr = xmlNodeGetAttribute ( i, "sr" ) or xmlNodeGetAttribute ( i, "r" ), sg = xmlNodeGetAttribute ( i, "sg" ) or xmlNodeGetAttribute ( i, "g" ), sb = xmlNodeGetAttribute ( i, "sb" ) or xmlNodeGetAttribute ( i, "b" ) } end return vehicles end addEventHandler( "onResourceStart", resourceRoot, function () for id, v in pairs ( vehiclesCache() ) do setElementID(createVehicle( tonumber (vehicles[id]["model"]), tonumber(vehicles[id]["x"]), tonumber(vehicles[id]["y"]), tonumber(vehicles[id]["z"]), tonumber(vehicles[id]["rotX"]), tonumber(vehicles[id]["rotY"]), tonumber(vehicles[id]["rotZ"])), id) local vehicle = getVehicleFromID( id ) setVehicleColor( vehicle, tonumber( vehicles[id]["r"]), tonumber( vehicles[id]["g"]), tonumber( vehicles[id]["b"]), tonumber( vehicles[id]["sr"]), tonumber( vehicles[id]["sg"]), tonumber( vehicles[id]["sb"])) if vehicles[id]["damage"] == "false" then setVehicleDamageProof( vehicle, true ) end if vehicles[id]["ptype"] == "team" then local lr, lg, lb = getTeamColor( getTeamFromName( vehicles[id]["owner"] ) ) setVehicleHeadLightColor( vehicle, lr, lg, lb ) end end end ) function getVehicleOwner( vehicle ) if vehicles[getElementID(vehicle)] then local owner = vehicles[getElementID(vehicle)]["owner"] if owner then return owner end end end addCommandHandler( "crear", function ( source, _, idd, modelo, stype, dueno, dano, cr, cg, cb, ssr, ssg, ssb) if isObjectInACLGroup ("user."..getAccountName( getPlayerAccount (source) ), aclGetGroup ( "RGB" ) ) then if not vehicles[idd] then if not isPedInVehicle( source ) then local sx, sy, sz = getElementPosition( source ) local rx, ry, rz = getElementRotation ( source ) if idd and modelo and stype and dueno and dano and cr and cg and cb then setElementID(createVehicle( tonumber (modelo), sx, sy, sz, rx, ry, rz), idd) vehicles[idd] = { id = idd, model = modelo, x = sx, y = sy, z = sz, rotX = rx, rotY = ry, rotZ = rz, ptype = stype, owner = dueno, damage = dano, r = cr, g = cg, b = cb, sr = ssr or cr, sg = ssg or cg, sb = ssb or cb} local vehicle = getVehicleFromID( idd ) warpPedIntoVehicle( source, vehicle ) if dano == "false" then setVehicleDamageProof( vehicle, true) end if not ssr and not ssg and not ssb then setVehicleColor( vehicle, tonumber( cr ), tonumber( cg), tonumber( cb), tonumber( cr ), tonumber( cg), tonumber( cb) ) elseif ssr and ssg and ssb then setVehicleColor( vehicle, tonumber( cr ), tonumber( cg), tonumber( cb), tonumber( ssr ), tonumber( ssg), tonumber( ssb) ) end if stype == "team" then local lr, lg, lb = getTeamColor( getTeamFromName( dueno ) ) setVehicleHeadLightColor( vehicle, lr, lg, lb ) end else outputChatBox( "Syntax: /create ID modelo Privatizacion Dueño Daño ColorR ColorG ColorB (ColorSecR ColorSecG ColorSecB.)", source, 255, 0, 0) end else outputChatBox( "Para evitar errores, por favor baja del vehiculo.", source, 255, 0, 0) end else outputChatBox( "ID Incorrecta, Quiza ya este en uso. Utilize otra.", source, 255, 0, 0) end else outputChatBox( "Comando solo para administradores.", source, 255, 0, 0) end end ) addCommandHandler( "borrar", function ( source ) if isObjectInACLGroup ("user."..getAccountName( getPlayerAccount (source) ), aclGetGroup ( "RGB" ) ) then if isPedInVehicle( source ) then local vehicle = getPedOccupiedVehicle( source ) local id = getElementID( vehicle ) if vehicles[id] then destroyElement( vehicle ) vehicles[id] = nil else outputChatBox( "Este vehiculo no esta privatizado.", source, 255, 0, 0) end else outputChatBox( "Debes estar en el vehiculo que deseas eliminar.", source, 255, 0, 0) end else outputChatBox( "Comando solo para administradores.", source, 255, 0, 0) end end ) try this but does not work with me function cars( source ) if isPedInVehicle(source) then local username = getAccountName( getPlayerAccount (source) ) local vehicle = getPedOccupiedVehicle( source ) local id = getElementID( vehicle ) if vehicles[id] then local x, y, z = getElementPosition ( source ) local rx, ry, rz = getElementRotation ( source ) vehicles[id]["x"] = x vehicles[id]["y"] = y vehicles[id]["z"] = z vehicles[id]["rotX"] = rx vehicles[id]["rotY"] = ry vehicles[id]["rotZ"] = rz setVehicleRespawnPosition( vehicle, x, y, z, rx, ry, rz) local r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4 = getVehicleColor ( vehicle, true ) vehicles[id]["r"] = r1 vehicles[id]["g"] = g2 vehicles[id]["b"] = b1 vehicles[id]["sr"] = r2 vehicles[id]["sg"] = g2 vehicles[id]["sb"] = b2 vehicles[id]["ptype"] = user vehicles[id]["owner"] = username vehicles[id]["model"] = getElementModel(vehicle) vehicles[id]["upgrades"] = getVehicleUpgrades(vehicle) setVehicleDamageProof(vehicle, true) end end end
  11. help I want to execute the command change the owner of the vehicle but it does not work ;( function cars( source,valor) if isPedInVehicle(source) then local username = getAccountName( getPlayerAccount (source) ) local vehicle = getPedOccupiedVehicle( source ) local id = getElementID( vehicle ) if vehicles[id] then if valor then if valor == "posicion" then local x, y, z = getElementPosition ( source ) local rx, ry, rz = getElementRotation ( source ) vehicles[id]["x"] = x vehicles[id]["y"] = y vehicles[id]["z"] = z vehicles[id]["rotX"] = rx vehicles[id]["rotY"] = ry vehicles[id]["rotZ"] = rz setVehicleRespawnPosition( vehicle, x, y, z, rx, ry, rz) elseif valor == "color" then local r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4 = getVehicleColor ( vehicle, true ) vehicles[id]["r"] = r1 vehicles[id]["g"] = g2 vehicles[id]["b"] = b1 vehicles[id]["sr"] = r2 vehicles[id]["sg"] = g2 vehicles[id]["sb"] = b2 elseif valor == "dueño" then vehicles[id]["ptype"] = user vehicles[id]["owner"] = username elseif valor == "modelo" then vehicles[id]["model"] = getElementModel(vehicle) elseif valor == "upgrades" then vehicles[id]["upgrades"] = getVehicleUpgrades(vehicle) elseif valor == "damage" then setVehicleDamageProof(vehicle, true) end end end end end addCommandHandler("car",cars)
  12. but I just want you to buy weapons in the shop
  13. ould you explain me how to use it please
  14. as I can make it just the ammunition he had left ;( ?
  15. but only if buy at the store
  16. Hello I have a gun shop and I wonder if it is possible that when the player dies do not miss the weapon buy until you run out of ammunition function Pistol() if ( getPlayerMoney(source) >= 500 ) then takePlayerMoney(source,500) giveWeapon(source,22, 100,true) outputChatBox ( "Gracias por tu compra : Pistol ", source, 255, 255, 255, true) else outputChatBox("Error 5674: Dinero Insuficiente", source, 250,230,0) end end addEvent("Pistol", true) addEventHandler("Pistol", root, Pistol) function Deagle() if ( getPlayerMoney(source) >= 800 ) then takePlayerMoney(source,800) giveWeapon(source,24, 50,true) outputChatBox ( "Gracias por tu compra : Deagle ", source, 255, 255, 255, true) else outputChatBox("Error 5674: Dinero Insuficiente", source, 250,230,0) end end addEvent("Deagle", true) addEventHandler("Deagle", root, Deagle)
  17. Jacobob14

    help radar

    I'm trying it on my radar next to the blip appears the nametag but does not work which is not the problem something like http://prntscr.com/3ou949 dxSetRenderTarget( mapRadar,true ) for i, v in ipairs( blips ) do local rot = getPedCameraRotation( localPlayer ) dxDrawImage(v.x-20/2, v.y-15, 30, 20,icons[v.icon]) end for i, v in ipairs(getElementsByType('player') ) do if v ~= localPlayer then local r,g,b = getPlayerNametagColor(v) local name= getPlayerName(v) local px,py = getElementPosition(v) local p_x = (3000+px)/6000*MimgW local p_y = (3000-py)/6000*MimgH local prot = getPedRotation( v ) local p_blipsize = 20-currentZoomState dxDrawImage (p_x-p_blipsize/2,p_y-p_blipsize/2,25,17, icons[1],0,0,0,tocolor(r,g,b)) dxDrawText ( name, p_x-p_blipsize/2,p_y-p_blipsize/2, 0,0, tocolor ( r, g, b, 255 ), textScale, textFont, "left", "top", false, false, true, true ) end end dxSetRenderTarget( )
  18. as I can make when entering this area players can not kill help pliz consesionaria = createColRectangle ( 2194.671875, 429.2763671875, 18.957292556763, 300, 210 ) safeZoneRadar1 = createRadarArea ( 2194.671875, 429.2763671875, 300, 210, 0, 187, 255, 155 ) setElementData (safeZoneRadar1, "zombieProof", true) setRadarAreaFlashing ( safeZoneRadar1, true )
  19. Jacobob14

    help :(

    and if I want a message to tell the group that this would be fine as well outputChatBox ( "#ff0000[ERROR] #ffffffel usuario #ff0000^("..getAccountName(getPlayerAccount(player))..")#ffffff ya tiene clan"..aclGetGroup(v), source, 200, 0 ,0, true)
  20. Jacobob14

    help :(

    there any way that this restriction if (not isObjectInACLGroup("user."..getAccountName(account),aclGetGroup(here groups))) then work with all groups of the table the scipt groups = { "|USS|", "|BSAA|", "|TwP|" } addEvent("Moderator1",true) function Moderator(player, groupname) local account = getPlayerAccount ( player ) local group = aclGetGroup ( "|BSAA|" ) if ( group ) then if (not isObjectInACLGroup("user."..getAccountName(account),aclGetGroup(here groups))) then aclGroupAddObject ( group, "user.".. getAccountName ( account )) outputChatBox ( "#ff0000[bSAA]#ffffff El user #a5d9f2^("..getAccountName(getPlayerAccount(player))..") #ffffff Fue Reclutado al clan ", source, 255, 255 ,255, true) else outputChatBox ( "error ", source, 255, 255 ,255, true) end end end addEventHandler("Moderator1", getRootElement(), Moderator)
  21. Jacobob14

    help :(

    please help the script works fine the problem is that teams you can still kill with knife and jostling with one vehicle as I can fix it function team( attacker ) if ( attacker and getElementType ( attacker ) == "player" ) then if ( attacker ~= source ) then local attackerTeam = getPlayerTeam ( attacker ) local sourceTeam = getPlayerTeam ( source ) if ( attackerTeam == sourceTeam ) then cancelEvent () end end end end addEventHandler ("onClientPlayerDamage",getRootElement(),team)
  22. Jacobob14

    HELP pliz

    help as I can do so that if someone is in a group acl which are shown in Table function is not fulfilled groups =[ "|USS|"; "|BSAA|"; "|TwP|" ] addEvent("Moderator1",true) function Moderator(player, groupname) local account = getPlayerAccount ( player ) local group = aclGetGroup ( "|BSAA|" ) if ( group ) then if (not isObjectInACLGroup("user."..getAccountName(account),aclGetGroup(here groups))) then aclGroupAddObject ( group, "user.".. getAccountName ( account )) outputChatBox ( "#ff0000[bSAA]#ffffff El user #a5d9f2^("..getAccountName(getPlayerAccount(player))..") #ffffff Fue Reclutado al clan ", source, 255, 255 ,255, true) else outputChatBox ( "error ", source, 255, 255 ,255, true) end end end addEventHandler("Moderator1", getRootElement(), Moderator)
  23. Jacobob14

    help ..

    still gives me error http://prntscr.com/3kz24z
  24. Jacobob14

    help ..

    http://prntscr.com/3kyx1t
  25. Jacobob14

    help ..

    which is the error the script does not work: ( [luafunction ranks ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local accountName = getAccountName ( account ) if not ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "|LTN" ) ) ) then --Grupo Admin-- local clan = tonumber ( clan ) setElementData ( thePlayer, "clan",":ranks/rangos/"..getElementData(thePlayer(),"level")..".png" ) triggerClientEvent("Rango",theplayer, clan) end end [/lua]
×
×
  • Create New...