Jump to content

JuniorMelo

Members
  • Posts

    120
  • Joined

  • Last visited

Details

  • Gang
    |S.s|

Recent Profile Visitors

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

JuniorMelo's Achievements

Sucka

Sucka (13/54)

0

Reputation

  1. local areanumber = getElementData (source,"areanumber") local ganginfo = getgangInfo(getPlayergang(hitElement)) local gangname = ganginfo['gangname'] local dbName = "VOLT_3" .. gangname .. "_members2" local players = executeSQLQuery("SELECT * FROM ?", dbName) maxPlayers = 2 for i,k in ipairs (getElementsByType ( "radararea" )) do local number = getElementData ( k, "areanumber" ) if ( number == areanumber ) then for t, k in ipairs(players) do if tonumber(t) <= tonumber(maxPlayers) then outputChatBox ( '#ff4444[ERROR]#ffffff It is necessary ' .. maxPlayers ..'',thePlayer, 255, 255, 255, true ); return end end end end I'm trying to do this, But I'm not sure if it will work properly. (It takes a number of players within the area to initiate an attack on the area) Sorry for my English, I'm brazilian
  2. local areanumber = getElementData (source,"areanumber") for i,k in ipairs (getElementsByType ( "radararea" )) do local number = getElementData ( k, "areanumber" ) if ( number == areanumber ) then for i, v in ipairs(getElementsByType ( "player" )) do outputChatBox ( ''..i..'', thePlayer, 255, 255, 255, true ) end end end such that ?
  3. You can count how many players are in a radar area ?
  4. It works this way. thx thx local ran = math.random(#Citys[city]) local x, y, z = Citys[city][ran].x, Citys[city][ran].y, Citys[city][ran].z
  5. hello, I have a bug in this function, not creating this marker in the city that the player is. Citys = {} markerPizza = createMarker( 2485.0024414063, 2022.3449707031, 9.8203125, "cylinder", 1.5, 255, 180, 0, 100) blipPizza = createBlipAttachedTo( markerPizza, 14, 2, 255, 255, 0, 255 ) Citys["Los Santos"] = { {x=2382.4638671875, y=-1891.9400634766, z=13.38914680481}, } Citys["San Fierro"] = { {x=-2686.283203125, y=270.83374023438, z=4.3359375}, } Citys["Las Venturas"] = { {x=2445.8454589844, y=2020.6320800781, z=10.8203125}, } function onPizzaMarkerHit(hitPlayer) Citys[i] = { x=x, y=y, z=z } local xx, yy, zz = getElementPosition ( localPlayer ) local city = getZoneName(xx, yy, zz, true) local x, y, z = Citys[city].x, Citys[city].y, Citys[city].z local marker = createMarker(x, y, z, "cylinder", 2, 255, 188, 0) local blip = createBlip(x, y, z, 24, 1) if isElement(markerPizza) then destroyElement(markerPizza) end if isElement(blipPizza) then destroyElement(blipPizza) end addEventHandler("onClientMarkerHit", marker, function() fadeCamera(false) setTimer(fadeCamera, 2000, 1, true) triggerServerEvent("EndJob", localPlayer, localPlayer, elements) end) end addEventHandler("onClientMarkerHit", markerPizza, onPizzaMarkerHit)
  6. very much to everyone, it helped greatly Citizen: very well explained
  7. hello, I wanted to know if I can use this function this way ? getPlayerCount, dimension 2 ====count players in dimension 2==== addEvent("text", true) addEventHandler("text", getRootElement(), function() for k,v in ipairs(getElementsByType("player")) do if getElementDimension ( v ) == 2 then local Count = getPlayerCount(v) setElementData(source,"players",Count) end end end)
  8. Thx Tosfera, this way is more practical and simple
  9. hello, table is just blocking 'Console' is not to block other words, Can anyone tell me why sorry my bad english noTeams = { "Console", "Admin", "Moderator", "SuperModerator" } function create( player, commandName, teamName ) if teamName ~= noTeams[1] and noTeams[2] then local gang = createTeam( teamName ) if (gang) then setPlayerTeam( player, gang ) setTeamColor ( gang, math.random(0,255), math.random(0,255), math.random(0,255) ) outputChatBox( getPlayerName(player) .." #677079Create team #0084FF" ..teamName, getRootElement(), 255, 255, 255,true, thePlayer ) end else outputChatBox("#A020F0[Gang] #ffffffERROR.",thePlayer,255,255,255,true) end end addCommandHandler("gang", create )
  10. this way does not work. I believe it is for an event , "onClientGUIClick" , triggerServerEvent("Ativo", getLocalPlayer(), getLocalPlayer(), Ativo); --Event Give Car triggerServerEvent("Garagem", getLocalPlayer(), getLocalPlayer(), Garagem); --Event Destroy Car ori9 = on; --dxDrawImage ON ori9 = off; -- dxDrawImage OFF
  11. No Have erros in /debugscript 3 function guiPart() f1 = guiCreateButton(logX-recX/2+(recX-cancelX-okX+375), logY+fAltUser*2+sep*3-47,okX-70, recY-375, "", false) f2 = guiCreateButton(logX-recX/2+(recX-cancelX-okX+375), logY+fAltUser*2+sep*3-2,okX-70, recY-375, "F2", false) f3 = guiCreateButton(logX-recX/2+(recX-cancelX-okX+375), logY+fAltUser*2+sep*3+43,okX-70, recY-375, "F2", false) guiSetAlpha ( f1, 0 ) guiSetAlpha ( f2, 0 ) guiSetAlpha ( f3, 0 ) end function MouseClick(button,state) if button == "left" and state == "down" then if ( source == f1 ) then triggerServerEvent("Ativo", getLocalPlayer(), getLocalPlayer(), Ativo) --Event GiveCar ori9 = on --Image ON else triggerServerEvent("Garagem", getLocalPlayer(), getLocalPlayer(), Garagem) --Event Destroy Car ori9 = off --image OFF end end end addEventHandler("onClientClick",getRootElement(),MouseClick)
  12. hello, I have this function that is not working , function MouseClick(button,state) if button == "left" and state == "down" then if ( source == f1 ) then triggerServerEvent("Ativo", getLocalPlayer(), getLocalPlayer(), Ativo) ori9 = on else triggerServerEvent("Garagem", getLocalPlayer(), getLocalPlayer(), garagem) ori9 = off end end end addEventHandler("onClientClick",getRootElement(),MouseClick)
  13. Hello,I have a doubt... it is possible to create a function that activates other functions randomly, using math.random Example local functions = {function1, function2} function reboot() for i,player in ipairs(getElementsByType("player")) do randomfunctions = math.random(#functions) setTimer( randomfunctions, 1000, 1, player ) end end function function1(player) end function function2(player) end
×
×
  • Create New...