Jump to content

side

Members
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

side's Achievements

Square

Square (6/54)

0

Reputation

  1. Hello, excuse me How can I make this line in the mta world kill a player with a timer set? addEventHandler("onClientRender", root, function() dxDrawLine3D(-1058.939453125, -1038.9775390625, 129.21875, -1058.939453125, -959.560546875, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1063.49609375, -1038.6083984375, 129.21875, -1063.49609375, -959.8740234375, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1068.0849609375, -1038.046875, 129.21875, -1068.0849609375, -960.078125, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1072.7587890625, -1037.7099609375, 129.21875, -1072.7587890625, -960.310546875, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1077.3701171875, -960.125, 129.21875, -1077.3701171875, -1037.7548828125, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1081.8896484375, -1037.5234375, 129.21875, -1081.8896484375, -960.166015625, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D( -1086.56640625, -959.869140625, 129.21875, -1086.56640625, -1036.8837890625, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1091.25390625, -1036.046875, 129.21875, -1091.25390625, -959.77734375, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1095.8359375, -959.755859375, 129.21875, -1095.8359375, -1035.5361328125, 129.21192932129, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1100.392578125, -1035.005859375, 129.21192932129, -1100.392578125, -959.66015625, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo dxDrawLine3D(-1104.919921875, -959.751953125, 129.21875, -1104.919921875, -1034.32421875, 129.21875, tocolor(255, 0, 0, 255), 25)--rojo end )
  2. hello community, I have the idea of creating a chat tag for teams, admin. the is an error that prevents its function. i want to know if you can help me or explain how i can do it works. i appreciate your valuable help. function Tags (msg, type) if type == 0 local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local red, green, blue = getPlayerNametagColor(source) local playerTeam = getPlayerTeam(source) local teamName = getTeamName(playerTeam) local hex = string.format("#%.2X%.2X%.2X", r, g, b) outputChatBox(""..team.." "..hex.." "..name..": #FFFFFF"..msg.."", getRootElement(), 255, 255, 255, true) if teamName == "~STAFF" isObjectInACLGroup("user."..account, aclGetGroup("Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("[owner] "..getPlayerName(source)..": #FFFFFF"..getPlayerNametagColor(source)..message, root, red, green, blue, true ) outputServerLog("[^Admin^] "..name..": "..msg) end end ) addEventHandler('onPlayerChat', getRootElement(), Tags)
  3. function chatbox( text, type) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#08BCD0~| Admin |~ #1AEBC1 " .. getPlayerName ( source ) .. ":#00FF36 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Admin] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#EB064F~| Moderator |~#1AEBC1 " .. getPlayerName ( source ) ..":#FFFFFF " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Moderator] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#EB064F~|> SMOD <|~##1AEBC1 " .. getPlayerName ( source ) ..":#FFFFFF " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [SMOD] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Diamante")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#EB064F~|> VIP Diamante <|~##1AEBC1 " .. getPlayerName ( source ) ..":#FFFFFF " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [VIP DIAMANTE] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Gold")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#EB064F~|> VIP GOLD <|~##1AEBC1 " .. getPlayerName ( source ) ..":#FFFFFF " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [VIP GOLD] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Soporte")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#08BCD0~| Sop |~#1AEBC1 " .. getPlayerName ( source ) .. ":#FF0005 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [sop] " .. getPlayerName ( source ) .. ": " .. text) elseif type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( " " .. getPlayerName ( source ) .. ":#FFFFFF " .. text, getRootElement(), r, g, b, true ) outputServerLog( "CHAT: " .. getPlayerName ( source ) .. ": " .. text ) end end addEventHandler("onPlayerChat", getRootElement(), chatbox) How can I add military teams, Delta force, the Survivor?
  4. SERVER ---------------------------------------------- local hillRadar = createRadarArea ( 1586.71667, -1156.09753, 220, 180, 53, 29, 174, 150 ) setElementData( hillRadar, 'zombieProof', true ) function nemesissbymanawydan ( ) --baz = createObject ( 360, 1629.98816, -1090.66821, 23.90625, 0, 0, 0 ) nemesis = exports [ "slothBot" ]:spawnBot ( 1629.98816, -1090.66821, 23.90625, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesis, 2 ) setElementData(nemesis,"SWAT", true) exports.notifications:showBox(root,"warning","#FFFF00[EVENTO]\n#FFFFFFUn experimento conocido como #800000BOSS SWAT #FFFFFFha escapado\nhacia #FF0000Los Santos!#FFFFFF Matalo y te recompensáremos #FF0000$15.000!") outputChatBox ("#FFFFFF",getRootElement(), 255, 255, 255, true ) outputChatBox ("#FFFFFF",getRootElement(), 255, 255, 255, true ) outputChatBox ("#FFFF00[EVENTO] #FFFFFFUn experimento conocido como #800000BOSS SWAT #FFFFFFha escapado hacia Los Santos! Matalo y te recompensáremos #FF0000$15.000!",getRootElement(), 255, 255, 255, true ) outputChatBox ("#FFFFFF",getRootElement(), 255, 255, 255, true ) outputChatBox ("#FFFFFF",getRootElement(), 255, 255, 255, true ) myBlip = (createBlipAttachedTo ( nemesis, 23 )) --attachElements ( baz, nemesis, 0.2, 0.1, 0.5, 0, 90, 0 ) exports.extra_health:setElementExtraHealth(nemesis, 7000) end addEventHandler("onResourceStart", resourceRoot, nemesissbymanawydan) function money (theKiller) if (source == nemesis) then givePlayerMoney(theKiller,15000) killerName = getPlayerName(theKiller) weapon = getPedWeapon(theKiller) wr, wg, wb = getPlayerNametagColor(theKiller) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=128,g=0,b=0}," BOSS SWAT"},getRootElement(),wr,wg,wb ) x,y,z = getElementPosition(source) triggerClientEvent ( "bossGrito", root, x, y, z) exports.notifications:showBox(root,"info","#FFFF00[EVENTO]\n#FFFFFFPueden estar tranquilos, el jugador:\n#FF0000"..getPlayerName ( theKiller ).."\n#FFFFFFaniquiló al #800000BOSS SWAT #FFFFFFy fue recompensado con #FF0000$15.000!") outputChatBox ("#FFFFFF",getRootElement(), 255, 255, 255, true ) outputChatBox ("#FFFFFF",getRootElement(), 255, 255, 255, true ) outputChatBox ( "#FFFF00[EVENTO] #FFFFFFPueden estar tranquilos, el jugador: #FF0000"..getPlayerName ( theKiller ).." #FFFFFFaniquiló al #800000BOSS SWAT #FFFFFFy fue recompensado con #FF0000$15.000!",getRootElement(), 255, 255, 255, true ) outputChatBox ("#FFFFFF",getRootElement(), 255, 255, 255, true ) outputChatBox ("#FFFFFF",getRootElement(), 255, 255, 255, true ) setTimer(nemesissbymanawydan, 3600000, 1) destroyElement(myBlip) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), money) function destroy () if ( not isElement ( nemesis ) ) then destroyElement(myBlip) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), destroy) ----------------------------------- CLIENT function grito(x, y, z) local boomb = playSound3D("SWAT.mp3", x, y, z, false) setSoundMaxDistance(boomb, 800) end addEvent( "bossGrito", true ) addEventHandler("bossGrito", root, grito ) --# Funcion Util: Barra de Vida function drawHPBar(x, y, v, d) if v < 0 then v = 0 elseif v > 7000 then v = 7000 end dxDrawRectangle(x - 21, y, 42, 5, tocolor(0, 0, 0, 255 - d)) dxDrawRectangle(x - 20, y + 1, v / 2.5, 3, tocolor((100 - v) * 2.55, v * 2.55, 0, 255 - d)) end local maxDist = 50 function SWAT() local bosses = getElementsByType ( "ped",getRootElement(),true ) local Px,Py,Pz = getCameraMatrix( ) for theKey,nemesis in ipairs(bosses) do if ( isElement( nemesis ) ) then local Zx,Zy,Zz = getElementPosition( nemesis ) local zhx,zhy,zhz = getPedBonePosition( nemesis,6 ) if (getDistanceBetweenPoints3D( Px, Py, Pz, Zx, Zy, Zz ) < maxDist ) then if ( getElementData (nemesis, "SWAT") == true) then local sxx,syy = getScreenFromWorldPosition(zhx,zhy,zhz+0.3) local currentDistance = getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) if sxx and getElementHealth(nemesis) > 0 then sx,sy = sxx-5,syy-10 dxDrawText("BOSS SWAT", (sx)+1, (sy)+1, sx+1, (sy)+1, tocolor(0, 0, 0, 255), 1.0, "default-bold", "center", "center", false, false, false) dxDrawText("BOSS SWAT", (sx), (sy), sx, sy, tocolor(128, 0, 0,255), 1.0, "default-bold", "center", "center", false, false, false) local health = getElementHealth(nemesis) if ( health > 0 ) then drawHPBar(sx, sy+10.5, health, currentDistance) end end end end end end end addEventHandler( "onClientRender", root, SWAT )
  5. Sorry for the inconvenience, could you give me an example, i added the outputchatbox and it showed infinitely in the chat, i would appreciate.
  6. Hello, sorry how can i create a message when leveling up with the following system. Thank You ! addEvent("onZombieWasted",true) addEventHandler("onZombieWasted",root, function (killer) givePlayerMoney(killer,25) addPlayerZombieKills(killer) end) function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if not zombieKills then setAccountData(account,"Zombie kills",0) end setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if zombieKills then setElementData(source,"Zombie kills",tostring(zombieKills)) else setElementData(source,"Zombie kills",0) end end ) addEventHandler("onElementDataChange",root, function() if getElementType(source) == "player" then local zombiekills = getAccountData(getPlayerAccount(source) ,"Zombie kills") or 0 if (zombiekills >= 0) and (zombiekills <= 10) then setElementData(source,"Rango","Rank/1.png") elseif (zombiekills >= 11) and (zombiekills <= 99) then setElementData(source,"Rango","Rank/2.png") elseif (zombiekills >= 100) and (zombiekills <= 299) then setElementData(source,"Rango","Rank/3.png") elseif (zombiekills >= 300) and (zombiekills <= 499) then setElementData(source,"Rango","Rank/4.png") elseif (zombiekills >= 500) and (zombiekills <= 699) then setElementData(source,"Rango","Rank/5.png") elseif (zombiekills >= 700) and (zombiekills <= 1299) then setElementData(source,"Rango","Rank/6.png") elseif (zombiekills >= 1300) and (zombiekills <= 1699) then setElementData(source,"Rango","Rank/7.png") elseif (zombiekills >= 1700) and (zombiekills <= 2099) then setElementData(source,"Rango","Rank/8.png") elseif (zombiekills >= 2100) and (zombiekills <= 4699) then setElementData(source,"Rango","Rank/9.png") elseif (zombiekills >= 4700) and (zombiekills <= 5399) then setElementData(source,"Rango","Rank/10.png") elseif (zombiekills >= 5400) and (zombiekills <= 6399) then setElementData(source,"Rango","Rank/11.png") elseif (zombiekills >= 6400) and (zombiekills <= 7399) then setElementData(source,"Rango","Rank/12.png") elseif (zombiekills >= 7400) and (zombiekills <= 8399) then setElementData(source,"Rango","Rank/13.png") elseif (zombiekills >= 8400) and (zombiekills <= 9399) then setElementData(source,"Rango","Rank/14.png") elseif (zombiekills >= 9400) and (zombiekills <= 10399) then setElementData(source,"Rango","Rank/15.png") elseif (zombiekills >= 10400) and (zombiekills <= 11399) then setElementData(source,"Rango","Rank/16.png") elseif (zombiekills >= 11400) and (zombiekills <= 13399) then setElementData(source,"Rango","Rank/17.png") elseif (zombiekills >= 13400) and (zombiekills <= 14399) then setElementData(source,"Rango","Rank/18.png") elseif (zombiekills >= 14400) and (zombiekills <= 15399) then setElementData(source,"Rango","Rank/19.png") elseif (zombiekills >= 15400) and (zombiekills <= 16399) then setElementData(source,"Rango","Rank/20.png") elseif (zombiekills >= 16400) and (zombiekills <= 17399) then setElementData(source,"Rango","Rank/21.png") elseif (zombiekills >= 17400) and (zombiekills <= 18399) then setElementData(source,"Rango","Rank/22.png") elseif (zombiekills >= 18400) and (zombiekills <= 18999) then setElementData(source,"Rango","Rank/23.png") elseif (zombiekills >= 19400) and (zombiekills <= 20399) then setElementData(source,"Rango","Rank/24.png") elseif (zombiekills >= 20400) and (zombiekills <= 20999) then setElementData(source,"Rango","Rank/25.png") elseif (zombiekills >= 21000) and (zombiekills <= 22999) then setElementData(source,"Rango","Rank/26.png") elseif (zombiekills >= 23000) and (zombiekills <= 24999) then setElementData(source,"Rango","Rank/27.png") elseif (zombiekills >= 25000) and (zombiekills <= 26999) then setElementData(source,"Rango","Rank/28.png") elseif (zombiekills >= 27000) and (zombiekills <= 28999) then setElementData(source,"Rango","Rank/29.png") elseif (zombiekills >= 29000) and (zombiekills <= 31999) then setElementData(source,"Rango","Rank/30.png") elseif (zombiekills >= 32000) and (zombiekills <= 36999) then setElementData(source,"Rango","Rank/31.png") elseif (zombiekills >= 37000) and (zombiekills <= 41999) then setElementData(source,"Rango","Rank/32.png") elseif (zombiekills >= 42000) and (zombiekills <= 46999) then setElementData(source,"Rango","Rank/33.png") elseif (zombiekills >= 47000) and (zombiekills <= 49999) then setElementData(source,"Rango","Rank/34.png") elseif (zombiekills >= 50000) and (zombiekills <= 64999) then setElementData(source,"Rango","Rank/35.png") elseif (zombiekills >= 65000) and (zombiekills <= 70999) then setElementData(source,"Rango","Rank/36.png") elseif (zombiekills >= 71000) and (zombiekills <= 76999) then setElementData(source,"Rango","Rank/37.png") elseif (zombiekills >= 77000) and (zombiekills <= 82999) then setElementData(source,"Rango","Rank/38.png") elseif (zombiekills >= 83000) and (zombiekills <= 88999) then setElementData(source,"Rango","Rank/39.png") elseif (zombiekills >= 89000) and (zombiekills <= 99899) then setElementData(source,"Rango","Rank/40.png") elseif (zombiekills >= 99900) and (zombiekills <= 99999) then setElementData(source,"Rango","Rank/41.png") elseif (zombiekills >= 100000) and (zombiekills <= 119999) then setElementData(source,"Rango","Rank/42.png") elseif (zombiekills >= 120000) and (zombiekills <= 149999) then setElementData(source,"Rango","Rank/43.png") elseif (zombiekills >= 150000) and (zombiekills <= 179999) then setElementData(source,"Rango","Rank/44.png") elseif (zombiekills >= 180000) and (zombiekills <= 199999) then setElementData(source,"Rango","Rank/45.png") elseif (zombiekills >= 200000) and (zombiekills <= 219999) then setElementData(source,"Rango","Rank/46.png") elseif (zombiekills >= 220000) and (zombiekills <= 239999) then setElementData(source,"Rango","Rank/47.png") elseif (zombiekills >= 240000) and (zombiekills <= 259999) then setElementData(source,"Rango","Rank/48.png") elseif (zombiekills >= 260000) and (zombiekills <= 289999) then setElementData(source,"Rango","Rank/49.png") elseif (zombiekills >= 290000) and (zombiekills <= 359999) then setElementData(source,"Rango","Rank/50.png") elseif (zombiekills >= 360000) and (zombiekills <= 10000000) then setElementData(source,"Rango","Rank/51.png") end end end ) addEventHandler("onPlayerSpawn",root, function () local cuenta = getPlayerAccount(source) if isGuestAccount(cuenta) then return end local rango = getAccountData(cuenta,"Rango") if rango then setElementData(source,"Rango", rango) end end )
  7. Good afternoon team, excuse me, my question is How can I create Teams for the next level system? example for rank 0 to rank 10, beginner, etc, i thank you in advance. addEventHandler("onElementDataChange",root, function() if getElementType(source) == "player" then local zombiekills = getAccountData(getPlayerAccount(source) ,"Zombie kills") or 0 if (zombiekills >= 0) and (zombiekills <= 10) then setElementData(source,"Rango","Rank/1.png") elseif (zombiekills >= 11) and (zombiekills <= 99) then setElementData(source,"Rango","Rank/2.png") elseif (zombiekills >= 100) and (zombiekills <= 299) then setElementData(source,"Rango","Rank/3.png") elseif (zombiekills >= 300) and (zombiekills <= 499) then setElementData(source,"Rango","Rank/4.png") elseif (zombiekills >= 500) and (zombiekills <= 699) then setElementData(source,"Rango","Rank/5.png") elseif (zombiekills >= 700) and (zombiekills <= 1299) then setElementData(source,"Rango","Rank/6.png") elseif (zombiekills >= 1300) and (zombiekills <= 1699) then setElementData(source,"Rango","Rank/7.png") elseif (zombiekills >= 1700) and (zombiekills <= 2099) then setElementData(source,"Rango","Rank/8.png") elseif (zombiekills >= 2100) and (zombiekills <= 4699) then setElementData(source,"Rango","Rank/9.png") elseif (zombiekills >= 4700) and (zombiekills <= 5399) then setElementData(source,"Rango","Rank/10.png") elseif (zombiekills >= 5400) and (zombiekills <= 6399) then setElementData(source,"Rango","Rank/11.png") elseif (zombiekills >= 6400) and (zombiekills <= 7399) then setElementData(source,"Rango","Rank/12.png") elseif (zombiekills >= 7400) and (zombiekills <= 8399) then setElementData(source,"Rango","Rank/13.png") elseif (zombiekills >= 8400) and (zombiekills <= 9399) then setElementData(source,"Rango","Rank/14.png") elseif (zombiekills >= 9400) and (zombiekills <= 10399) then setElementData(source,"Rango","Rank/15.png") elseif (zombiekills >= 10400) and (zombiekills <= 11399) then setElementData(source,"Rango","Rank/16.png") elseif (zombiekills >= 11400) and (zombiekills <= 13399) then setElementData(source,"Rango","Rank/17.png") elseif (zombiekills >= 13400) and (zombiekills <= 14399) then setElementData(source,"Rango","Rank/18.png") elseif (zombiekills >= 14400) and (zombiekills <= 15399) then setElementData(source,"Rango","Rank/19.png") elseif (zombiekills >= 15400) and (zombiekills <= 16399) then setElementData(source,"Rango","Rank/20.png") elseif (zombiekills >= 16400) and (zombiekills <= 17399) then setElementData(source,"Rango","Rank/21.png") elseif (zombiekills >= 17400) and (zombiekills <= 18399) then setElementData(source,"Rango","Rank/22.png") elseif (zombiekills >= 18400) and (zombiekills <= 18999) then setElementData(source,"Rango","Rank/23.png") elseif (zombiekills >= 19400) and (zombiekills <= 20399) then setElementData(source,"Rango","Rank/24.png") elseif (zombiekills >= 20400) and (zombiekills <= 20999) then setElementData(source,"Rango","Rank/25.png") elseif (zombiekills >= 21000) and (zombiekills <= 22999) then setElementData(source,"Rango","Rank/26.png") elseif (zombiekills >= 23000) and (zombiekills <= 24999) then setElementData(source,"Rango","Rank/27.png") elseif (zombiekills >= 25000) and (zombiekills <= 26999) then setElementData(source,"Rango","Rank/28.png") elseif (zombiekills >= 27000) and (zombiekills <= 28999) then setElementData(source,"Rango","Rank/29.png") elseif (zombiekills >= 29000) and (zombiekills <= 31999) then setElementData(source,"Rango","Rank/30.png") elseif (zombiekills >= 32000) and (zombiekills <= 36999) then setElementData(source,"Rango","Rank/31.png") elseif (zombiekills >= 37000) and (zombiekills <= 41999) then setElementData(source,"Rango","Rank/32.png") elseif (zombiekills >= 42000) and (zombiekills <= 46999) then setElementData(source,"Rango","Rank/33.png") elseif (zombiekills >= 47000) and (zombiekills <= 49999) then setElementData(source,"Rango","Rank/34.png") elseif (zombiekills >= 50000) and (zombiekills <= 64999) then setElementData(source,"Rango","Rank/35.png") elseif (zombiekills >= 65000) and (zombiekills <= 70999) then setElementData(source,"Rango","Rank/36.png") elseif (zombiekills >= 71000) and (zombiekills <= 76999) then setElementData(source,"Rango","Rank/37.png") elseif (zombiekills >= 77000) and (zombiekills <= 82999) then setElementData(source,"Rango","Rank/38.png") elseif (zombiekills >= 83000) and (zombiekills <= 88999) then setElementData(source,"Rango","Rank/39.png") elseif (zombiekills >= 89000) and (zombiekills <= 99899) then setElementData(source,"Rango","Rank/40.png") elseif (zombiekills >= 99900) and (zombiekills <= 99999) then setElementData(source,"Rango","Rank/41.png") elseif (zombiekills >= 100000) and (zombiekills <= 119999) then setElementData(source,"Rango","Rank/42.png") elseif (zombiekills >= 120000) and (zombiekills <= 149999) then setElementData(source,"Rango","Rank/43.png") elseif (zombiekills >= 150000) and (zombiekills <= 179999) then setElementData(source,"Rango","Rank/44.png") elseif (zombiekills >= 180000) and (zombiekills <= 199999) then setElementData(source,"Rango","Rank/45.png") elseif (zombiekills >= 200000) and (zombiekills <= 219999) then setElementData(source,"Rango","Rank/46.png") elseif (zombiekills >= 220000) and (zombiekills <= 239999) then setElementData(source,"Rango","Rank/47.png") elseif (zombiekills >= 240000) and (zombiekills <= 259999) then setElementData(source,"Rango","Rank/48.png") elseif (zombiekills >= 260000) and (zombiekills <= 289999) then setElementData(source,"Rango","Rank/49.png") elseif (zombiekills >= 290000) and (zombiekills <= 359999) then setElementData(source,"Rango","Rank/50.png") elseif (zombiekills >= 360000) and (zombiekills <= 10000000) then setElementData(source,"Rango","Rank/51.png") end end end )
  8. side

    Help Tag Chat

    Hello thank you for responding, I am new to this and would like to know in what way I can link the ranks of a level system to chat, Survivor, Military, etc I appreciate if you give me an example or what arguments can I use
  9. side

    Help Tag Chat

    Hello, sorry for the inconvenience as I can implement a chat system based on ranges using local data = getElementData (client, "nvl") I would appreciate the help ---------------------------------------------------------------------------- addEventHandler ( "onPlayerChat", root, function ( msg, type ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#FF0000*[ ADMIN ] " .. getPlayerName ( source ) .. ":#4DFF00 " .. msg, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#001FDB*[ MOD ] " .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#FF0000*[ S-MOD ] " .. getPlayerName ( source ) .. ":#FF8300 " .. msg, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Soporte" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#00FF00*[ SOP ] " .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Everyone" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#FF6A15*[ SOBREVIVIENTE ] " .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) end end )
  10. You could help me, I would like to create an indicator about the world of gta sa, if you could give me an example, I thank you ---------------------------------------------------------------------------------------------------------------------------------------------- -- OBJECTIVE INDICATORS BY MADNESSRELOADED -- -- createObjectiveIndicator (x,y,z,name[,maxdistance,mindistance,r,g,b,image]) -- RETURNS ID -- destroyObjectiveIndicator (id) -- GET THE ID RETURNED BY CREATEOBJECTIVEINDICATOR -- drawObjectiveIndicator (x,y,z,name[,maxdistance,mindistance,r,g,b,image]) allzones = { } function round(num, numDecimalPlaces) local mult = 10^(numDecimalPlaces or 0) return math.floor(num * mult + 0.5) / mult end function isPedAiming ( thePedToCheck ) --https://wiki.multitheftauto.com/wiki/IsPedAiming if isElement(thePedToCheck) then if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then return true end end end return false end function dxDrawBordered( text, x, y, w, h, color, scale, font, ax, ay, clip, wb, postgui ) dxDrawText ( text, x - 1.2, y - 1.2, w - 1.2, h - 1.2, tocolor ( 0, 0, 0, 255 ), scale, font, ax, ay, clip, wb, false ) dxDrawText ( text, x + 1.2, y - 1.2, w + 1.2, h - 1.2, tocolor ( 0, 0, 0, 255 ), scale, font, ax, ay, clip, wb, false ) dxDrawText ( text, x - 1.2, y + 1.2, w - 1.2, h + 1.2, tocolor ( 0, 0, 0, 255 ), scale, font, ax, ay, clip, wb, false ) dxDrawText ( text, x + 1.2, y + 1.2, w + 1.2, h + 1.2, tocolor ( 0, 0, 0, 255 ), scale, font, ax, ay, clip, wb, false ) dxDrawText ( text, x - 1.2, y, w - 1.2, h, tocolor ( 0, 0, 0, 255 ), scale, font, ax, ay, clip, wb, false ) dxDrawText ( text, x + 1.2, y, w + 1.2, h, tocolor ( 0, 0, 0, 255 ), scale, font, ax, ay, clip, wb, false ) dxDrawText ( text, x, y - 1.2, w, h - 1.2, tocolor ( 0, 0, 0, 255 ), scale, font, ax, ay, clip, wb, false ) dxDrawText ( text, x, y + 1.2, w, h + 1.2, tocolor ( 0, 0, 0, 255 ), scale, font, ax, ay, clip, wb, false ) dxDrawText ( text, x, y, w, h, color, scale, font, ax, ay, clip, wb, postgui ) end function drawObjectiveIndicator (wwx,wwy,wwz,type,maxdist,lowdist,r,g,b,image) local measure = "m" local screenW, screenH = getScreenFromWorldPosition(wwx, wwy, wwz+1) if not screenW then return end local x,y,z = getElementPosition(localPlayer) local dst = math.floor(getDistanceBetweenPoints3D (x,y,z,wwx,wwy,wwz)) if dst< (lowdist or 50) then return end if dst > (maxdist or 5000) then return end dxDrawImage(screenW-16, screenH-16, 25, 25,image or "pin.png",0,0,0,tocolor (255,255,255,150)) local wr = screenW-16 local wu = screenH-32 local sz =32 local sy =32 dst = math.floor(getDistanceBetweenPoints3D (x,y,z,wwx,wwy,wwz)) if dst <100 then wr = screenW-16 elseif dst > 99 and dst<1000 then wr = screenW-13 elseif dst >999 then wr = screenW-16 dst = round(dst/1000,1) measure = "km" end dxDrawBordered (type.." ("..dst..""..measure..")",wr, wu,sz,sy+1,tocolor (r or 255,g or 255,b or 255,255),1,"sans serif","left") end function createObjectiveIndicator (x,y,z,name,maxdistance,mindistance,r,g,b,image) if not x or not y or not z then outputDebugString ("Objective indicator position not specified.",2) elseif not name then outputDebugString ("Objective name not specified.",2) return end if not maxdistance or maxdistance == nil then maxdistance = 5000 end if not mindistance or mindistance == nil then mindistance = 50 end if not r or not g or not b then r,g,b = 255,255,255 end local id = #allzones+1 table.insert (allzones, id, {x,y,z,name,maxdistance,mindistance,r,g,b,image}) return #allzones end function destroyObjectiveIndicator (id) table.remove (allzones,id) end addEventHandler ("onClientRender",root,function() if isPedAiming (localPlayer) then return end for i,zone in ipairs (allzones) do x,y,z,name,maxdistance,mindistance,r,g,b,image = unpack (zone) drawObjectiveIndicator (x,y,z,name,maxdistance,mindistance,r,g,b,image) end end) - - - - - - - - - - - -- - - - -- - - -- - -- - - -- - - -- - - - -- - - - - - <meta> <info author="MadnessReloaded" name="Objective Indicators" version="1.0" type="script"/> <script src="client.lua" type="client" cache="false"/> <min_mta_version client="1.5.0" server="1.4.0"/> <file src="pin.png"/> <export function="createObjectiveIndicator" type="client"/> <export function="drawObjectiveIndicator" type="client"/> <export function="removeObjectiveIndicator" type="client"/> </meta>
  11. side

    (HELP) Marker Clothes

    Hello, excuse me, I have a question, how can I make the cj clothing store panel appear through a bookmark? and not by command, I appreciate your help! ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ root = getRootElement () outputChatBox ( "Tienda Cj Iniciada " ) function activateMenu ( player, key ) if (mainWindow) then guiSetVisible ( mainWindow, true ) else mainWindow = guiCreateWindow ( 0.01, 0.17, 0.3, 0.6, "CJ Customization - Enter Numbers & Apply", true ) guiCreateLabel(0.03, 0.045, 0.94, 0.5, " Shirt:", true, mainWindow) guiCreateLabel(0.03, 0.09, 0.94, 0.5, " Hair:", true, mainWindow) guiCreateLabel(0.03, 0.135, 0.94, 0.5, " Pants:", true, mainWindow) guiCreateLabel(0.03, 0.18, 0.94, 0.5, " Shoes:", true, mainWindow) guiCreateLabel(0.03, 0.225, 0.94, 0.5, " Hat:", true, mainWindow) guiCreateLabel(0.03, 0.27, 0.94, 0.5, " Glasses:", true, mainWindow) guiCreateLabel(0.03, 0.315, 0.94, 0.5, " Necklace:", true, mainWindow) guiCreateLabel(0.03, 0.36, 0.94, 0.5, " Watch:", true, mainWindow) guiCreateLabel(0.03, 0.405, 0.94, 0.5, " Tattoos Left Chest:", true, mainWindow) guiCreateLabel(0.03, 0.45, 0.94, 0.5, " Tattoos Right Chest:", true, mainWindow) guiCreateLabel(0.03, 0.495, 0.94, 0.5, " Tattoos Stomach:", true, mainWindow) guiCreateLabel(0.03, 0.54, 0.94, 0.5, " Tattoos Back:", true, mainWindow) guiCreateLabel(0.03, 0.585, 0.94, 0.5, " Tattoos Lower Back:", true, mainWindow) guiCreateLabel(0.03, 0.63, 0.94, 0.5, " Tattoos Left Upper Arm:", true, mainWindow) guiCreateLabel(0.03, 0.675, 0.94, 0.5, " Tattoos Left Lower Arm:", true, mainWindow) guiCreateLabel(0.03, 0.72, 0.94, 0.5, "Tattoos Right Upper Arm:", true, mainWindow) guiCreateLabel(0.03, 0.765, 0.94, 0.5, "Tattoos Right Lower Arm:", true, mainWindow) guiCreateLabel(0.03, 0.81, 0.94, 0.5, " \"Extra\" CJ Skins:", true, mainWindow) guiCreateLabel(0.03, 0.855, 0.94, 0.5, " Fat Stat:", true, mainWindow) guiCreateLabel(0.03, 0.9, 0.94, 0.5, " Muscle Stat:", true, mainWindow) editA = guiCreateEdit( 0.5, 0.045, 0.2, 0.045, "", true, mainWindow ) editB = guiCreateEdit( 0.5, 0.09, 0.2, 0.045, "", true, mainWindow ) editC = guiCreateEdit( 0.5, 0.135, 0.2, 0.045, "", true, mainWindow ) editD = guiCreateEdit( 0.5, 0.18, 0.2, 0.045, "", true, mainWindow ) editQ = guiCreateEdit( 0.5, 0.225, 0.2, 0.045, "", true, mainWindow ) editP = guiCreateEdit( 0.5, 0.27, 0.2, 0.045, "", true, mainWindow ) editN = guiCreateEdit( 0.5, 0.315, 0.2, 0.045, "", true, mainWindow ) editO = guiCreateEdit( 0.5, 0.36, 0.2, 0.045, "", true, mainWindow ) editJ = guiCreateEdit( 0.5, 0.405, 0.2, 0.045, "", true, mainWindow ) editK = guiCreateEdit( 0.5, 0.45, 0.2, 0.045, "", true, mainWindow ) editL = guiCreateEdit( 0.5, 0.495, 0.2, 0.045, "", true, mainWindow ) editI = guiCreateEdit( 0.5, 0.54, 0.2, 0.045, "", true, mainWindow ) editM = guiCreateEdit( 0.5, 0.585, 0.2, 0.045, "", true, mainWindow ) editE = guiCreateEdit( 0.5, 0.63, 0.2, 0.045, "", true, mainWindow ) editF = guiCreateEdit( 0.5, 0.675, 0.2, 0.045, "", true, mainWindow ) editG = guiCreateEdit( 0.5, 0.72, 0.2, 0.045, "", true, mainWindow ) editH = guiCreateEdit( 0.5, 0.765, 0.2, 0.045, "", true, mainWindow ) editR = guiCreateEdit( 0.5, 0.81, 0.2, 0.045, "", true, mainWindow ) editS = guiCreateEdit( 0.5, 0.855, 0.2, 0.045, "", true, mainWindow ) editT = guiCreateEdit( 0.5, 0.9, 0.2, 0.045, "", true, mainWindow ) applyButton = guiCreateButton( 0.8, 0.1, 0.2, 0.3, "Apply", true, mainWindow ) exitButton = guiCreateButton( 0.8, 0.5, 0.2, 0.3, "Exit", true, mainWindow ) end showCursor ( true ) end addCommandHandler ( "c", activateMenu ) function clickedButtonCheck ( element ) if source == applyButton then incredibleTable = { --the order is mixed because i sorted GUI menu better than type listings in code [0] = { storedValue = guiGetText ( editA ) }, [1] = { storedValue = guiGetText ( editB ) }, [2] = { storedValue = guiGetText ( editC ) }, [3] = { storedValue = guiGetText ( editD ) }, [4] = { storedValue = guiGetText ( editE ) }, [5] = { storedValue = guiGetText ( editF ) }, [6] = { storedValue = guiGetText ( editG ) }, [7] = { storedValue = guiGetText ( editH ) }, [8] = { storedValue = guiGetText ( editI ) }, [9] = { storedValue = guiGetText ( editJ ) }, [10] = { storedValue = guiGetText ( editK ) }, [11] = { storedValue = guiGetText ( editL ) }, [12] = { storedValue = guiGetText ( editM ) }, [13] = { storedValue = guiGetText ( editN ) }, [14] = { storedValue = guiGetText ( editO ) }, [15] = { storedValue = guiGetText ( editP ) }, [16] = { storedValue = guiGetText ( editQ ) }, [17] = { storedValue = guiGetText ( editR ) }, [18] = { storedValue = guiGetText ( editS ) --Fat Stat }, [19] = { storedValue = guiGetText ( editT ) --Muscle Stat } } triggerServerEvent ( "applyClothes", getLocalPlayer (), incredibleTable ) elseif source == exitButton then guiSetVisible ( mainWindow, false ) showCursor ( false ) end end addEventHandler ( "onClientGUIClick", root, clickedButtonCheck )
  12. side

    (HELP) SPAWN GROUP

    Digital, thank you very much for your help bro, I was very helpful
  13. Hello, I have a server and I would like to use a spawn by Groups I want the clan members to be able to activate and deactivate this spawn with a command. If you can help me, I thank you --------------------------------------------------------------------------------------------------------------------------- local GroupName = 'KILLERS' function onWasted () if getElementData(source,'Group') == 'KILLERS' then setTimer( function (source) setElementDimension( source, 0 ) setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 ) setElementInterior( source, 0 ) setPedArmor ( source, 100) setPedFightingStyle ( source, 5) end, 1000, 1, source) end end addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )
×
×
  • Create New...