Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 22/06/20 in Posts

  1. 5Station | فايف ستيشن ندعم طرق دفع : التحويل البنكي - سوا - باي بال تفعيل سريع خلال 3 ساعات تنويه : هذا الموضوع لعرض الخصومات والعروض الخاصة بالموقع بس https://5Station.net : رابط الموقع
    1 point
  2. addEventHandler('onClientGUIClick',root, function() if source == contrar then local row = guiGridListGetSelectedItem(jugador) local text = guiGridListGetItemText(jugador,row,1) if ( row > -1 ) then triggerServerEvent('setEmpresa',getPlayerFromName(text)) guiSetVisible(contrataciones,false) showCursor(false) end end end) No lo probe, pero creeria que anda.
    1 point
  3. لاتنسون تشاركون في القيف اواي .. المشاركين الى الان 192 شخص .. جوائز قيمة رابط السيرفر : https://discord.gg/yD8NAw8
    1 point
  4. Atualize a página (F5) e veja a resposta anterior que mandei. https://forum.multitheftauto.com/topic/112870-ajuda-coloca-varias-acl/?tab=comments#comment-982482
    1 point
  5. Os exemplos que mostramos não usam or
    1 point
  6. Já tentou usar o exemplo dos outros códigos neste tópico? local variasACL = {"Staff", "Staff2"} -- Pode colocar quantas quiser. function anim.espere2 () local nomeAcc = getAccountName (getPlayerAccount (source)) for i, acl in ipairs (variasACL) do -- Para cada nome de ACL da tabela variasACL, faça: if isObjectInACLGroup ("user."..nomeAcc, aclGetGroup(acl)) then setPedFortniteAnimation (source, "baile 1", -1, true, false, false, false) return end end outputChatBox ("Somente membros com VIP!", source, 255, 0, 0) end addEvent ("anim.espere2", true) addEventHandler ("anim.espere2", root, anim.espere2)
    1 point
  7. Faz a verificação server-side, se possuir permissão, faz um triggerClientEvent para ativar tal evento no client-side.
    1 point
  8. @zRodrigoMMA questão é: O que está certo nesse código?
    1 point
  9. 1 point
  10. dxDrawRectangle(screenW * 0.5514, screenH * 0.5022, screenW * 0.1319, screenH * 0.0522, COLOR, false) COLOR = tocolor(0, 0, 0, 150) if isCursorOnElement (screenW * 0.5514, screenH * 0.5022, screenW * 0.1319, screenH * 0.0522) then COLOR = tocolor(30, 144, 255, 150) end O COLOR você coloca no lugar do tocolor(xxx, xxx, xxx, xxx)
    1 point
  11. "Ele é client", querido olhe na wiki a função isObjectInACLGroup é somente server-side ;D
    1 point
  12. Si buscas uno de pago para X sistemas te recomiendo a https://forum.multitheftauto.com/profile/47606-aka-blue/ maneja mucho del tema.
    1 point
  13. veh = {} vehQuebrado = {} variasACL = {"CV", "PCC", "AQD"} -- Pode colocar quantas quiser. function inicio (hitElement) -- Função do primeiro marker if getElementType (hitElement) == "player" and not getPedOccupiedVehicle (hitElement) then local accName = getAccountName (getPlayerAccount(hitElement)) local permission = false for i, acl in ipairs (variasACL) do if isObjectInACLGroup ("user."..accName, aclGetGroup (acl)) then permission = true break end end if permission then if veh[hitElement] and isElement (veh[hitElement]) then destroyElement (veh[hitElement]) veh[hitElement] = nil end if vehQuebrado[hitElement] and isElement (vehQuebrado[hitElement]) then destroyElement (vehQuebrado[hitElement]) vehQuebrado[hitElement] = nil end x, y, z = getElementPosition (hitElement) Trabalho = true FBlip = createBlipAttachedTo (FMarker, 19) -- Bandeira veh[hitElement] = createVehicle (578, 2533.0673828125, -1465.904296875, 23.977584838867, 0, 0, 270) -- Caminhão warpPedIntoVehicle (hitElement, veh[hitElement]) -- Transporta o jogador para dentro do caminhão vehQuebrado[hitElement] = createVehicle (411, 2533.0673828125, -1465.904296875, 23.977584838867, 0, 0,270) -- Caminhonete attachElements (vehQuebrado[hitElement], veh[hitElement], 0, -2, 0.7) setElementVisibleTo (FMarker, hitElement, true) outputChatBox ("#00ccff[Emprego] #ffffffBem-Vindo ao emprego #00ccff[Reboque]", hitElement, 255, 255, 255, true) setElementFrozen( vehQuebrado[hitElement], true ) else outputChatBox ("[#ff0000AVISO#00ccff] #ff0000Gangues não pode trabalha!!!", hitElement, 0, 204, 255, true) end end end addEventHandler ("onMarkerHit", PMarker, inicio) Espero ter ajudado.
    1 point
  14. You can use it to find substring (string inside) of the string. start, end = string.find( "Hello world", "wor" ) -- would return 7 and 9 (7 is where it was found, and 9 is where it ends) start, end = string.find( "Hello world", "hel" ) -- would return nil because "hel" is not found in the string start, end = string.find( "Hello world", "Hel" ) -- would return 1 and 3 (found "Hel" at 1 and ended at 3) You have to remember that the second string (the string you are searching) is a "pattern" and that means you can do special searches like in Regular Expression to find for example date in a string start, end = string.find( "Today is 29/04/2013", "%d%d/%d%d/%d%d%d%d" ) -- it would return 10 and 19 (date starts at character 10 and ends at character 19) There are more special (or magic) characters you can use, eg: start, end, day, month, year = string.find( "Today is 29/04/2013", "(%d+)/(%d+)/(%d+)" ) -- it would return 5 values: 10, 19 (like example above -^-) and also 3 more values captured between ( and ) => 29 04 2013 You can tell the function to ignore any special characters in the pattern and search for simple string: start, end = string.find( "Your clan is [clan]", "[clan]", 1, true ) -- the 3rd parameter 1 tell the function where to start searching for the substring, the last parameter tell the func to ignore any special characters (in this case: [ and ] are special chars) -- the result would be 14 and 19 (found at 14 and ends at 19) The string.find function is powerful but you can use the this example to find any simple substring you want ignoring any "magic" characters If you want to get string in between [ and ] (for example to get player's clan) then you can use the pattern as follows: start, end, clan = string.find( "[MYCLAN]PlayerName", "%[(%w+)%]" ) -- it would return 1, 8 and "MYCLAN" (found at 1, ends at 8 and the capture (%w+) => MYCLAN) "%[(%w+)%]" => %[ this means you want to find [ in your string, then (%w+) means you want to capture all the letters after [, and then %] means you want to finish looking for pattern at ] Like I said it's a powerful function but you need to know how the function works and what is Regular Expression because these 2 share the same logic. You said you read over and over again but can't understand, if you still don't understand then I'm not sure how to help you.
    1 point
  15. 0 points
×
×
  • Create New...