Jump to content

MrKAREEM

Members
  • Posts

    621
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by MrKAREEM

  1. function createTreasure() treasureRadar = createRadarArea( treasurePositions[randomRadar][1] - 25, treasurePositions[randomRadar][2] - 25, 50, 50, 255, 221, 0, 100) treasureArea = createColRectangle( treasurePositions[randomRadar][1] - 25, treasurePositions[randomRadar][2] - 25, 50, 50) treasureObject = createObject(2060, treasurePositions[randomRadar].tabel[randomTreasure][1], treasurePositions[randomRadar].tabel[randomTreasure][2], treasurePositions[randomRadar].tabel[randomTreasure][3] - 1) treasureCol = createColSphere(treasurePositions[randomRadar].tabel[randomTreasure][1], treasurePositions[randomRadar].tabel[randomTreasure][2], treasurePositions[randomRadar].tabel[randomTreasure][3] - 1, 1.5) attachElements(treasureCol, treasureObject) if (treasureObject) then setObjectScale (treasureObject, 2) end end addEventHandler("onResourceStart", getRootElement(), createTreasure) addEventHandler("onColShapeHit", treasureArea, function(thePlayer) if (getElementType(thePlayer) == "player") then setRadarAreaFlashing( treasureRadar, true ) end end ) addEventHandler("onColShapeLeave", treasureArea, function(thePlayer) if (getElementType(thePlayer) == "player") then setRadarAreaFlashing( treasureRadar, false ) end end ) addEventHandler("onColShapeHit", treasureCol, function(thePlayer) local detect = isElementWithinColShape (thePlayer, treasureCol) if detect then outputChatBox("Write /dig to dig", thePlayer, 255,255,255 ) end end ) function playerDigTreasure(thePlayer, command) local detect = isElementWithinColShape (thePlayer, treasureCol) if detect then setPedAnimation(thePlayer, "BOMBER", "BOM_Plant", -1, false, false, nil, false); setTimer( function() givePlayerMoney( thePlayer, 100000) destroyElement(treasureObject) destroyElement(treasureCol) destroyElement(treasureArea) destroyElement(treasureRadar) outputChatBox("Next treasure spawning in 5 seconds", getRootElement(), 255,255,255 ) setTimer(createTreasure, 5000, 1) end, 2000, 1) end end addCommandHandler("dig", playerDigTreasure) delete the locals and the variables will read in the whole events and it will be better if you check the elements before destroy it or put it in events using IsElement + the point that majqq said about resource event
  2. can you show me an example right vedio or something and i will understand what you mean
  3. o problema é que não há evento chamado superman:start no lado do servidor
  4. porquê programar códigos na língua portugal ? como estas linhas: função getPlayerID (id) v = false para i, player em ipairs (getElementsByType ("player")) faz se getElementData (player, "ID") == id em seguida v = player break end end return v end
  5. crie tabela como este exemplo, que possui 2 colunas, a primeira é a sequência do nome do seu veículo personalizado e o segundo é o ID do veículo que você deseja alterar o nome vehicles = { {'Ferrari',577}, {'Lamborghini',519}, } Table e quando ele entrar na garagem, pegue a ID do veículo usando a função abaixo GetElementModel depois de obter a ID, verifique se a ID atual do veículo na tabela ou não local id = getElementModel(your car here) for i,v in ipairs(vehicles) do if v[2] == id then Text = v[1] else end end agora você pode usar o texto variável no desenho dxText
  6. i think the problem not from the events try to get the speed of the vehicle GetElementSpeed SetElementSpeed because i used the event onClientVehicleCollision before but i force the velocity on the object with some maths not the vehicle
  7. addEventHandler("onClientVehicleCollision", root, function(collider,force, bodyPart, x, y, z, nx, ny, nz) local theVehicle = getPedOccupiedVehicle (localPlayer) if (theVehicle) and (source == theVehicle) then local SX , SY , SZ = getElementVelocity ( source ) setTimer( setElementVelocity, 100, 1, source , SX , SY , SZ ) end end) it's important to check if the ped in vehicle or not
  8. Have you ever tried to start the script via the START command in F8
  9. اعتقد انك مش حاطط ريفليكشون تيكستشر للموتر فدي مش مشكلة عندك بالنسبة ان الجنط والعلم والعلامات ورا دخلوا فبعض فدي مشكلة ساعات بتحصل الحل انك تقسم الجنطات في لاير والعلم في لاير والعلامات اللي ورا في لاير بحيث تكون فصلتهم كلهم عن الموتر وفصلتهم عن بعض بعدين تعيد تظبيط التكسشر ليهم وفي الاخر اعمل اتاك تاني لكل حاجة زي مكانت مع ان الجنط علي ما اعتقد انه دومي لواحدها ففي حالة انه مظبطش مع طريقة اللي فوق هتقوم شايل التكسشر المشترك بينهم دا وتعمل التكسشر من جديد واحد للجنط وواحد للعلم فيه طريقة ثانية مش متذكرها اوي بس كانت من انك تعمل كليك يمين علي المجسم وتجيب properties uvmap بعدين تخلي ال علي 1 المهم شوف الطرق اللي ادتهالك ورد عليا واعتذر اني مشفتش الرد فيه مشكلة ومجاليش اشعار بالصدفة شفت الموضوع تاني
  10. OnPlayerQuit OnPlayerJoin SetAccountData GetAccountData or use Database
  11. MrKAREEM

    ID

    and GetAccountID ?
  12. obtenha seu dinheiro atual no caixa eletrônico usando as funções de exportação e desenhe um texto com o valor agregado , para fazer uma pequena atualização, use seus eventos no recurso atm, como ao depositar, use as funções de exportação e atualize o valor no recurso hud Call
  13. bro you try to use setElementFrozen , setVehicleDoorOpenRation, fixVehicle ect. on an Element Data !
  14. MrKAREEM

    Grafik hatası

    Bu sorun yalnızca bu sunucuda mı yoksa çok sayıda sunucuda mı oldu?
  15. GetElementVelocity SetElementVelocity you can use OnClientVehicleCollision element theHitElement, float force, int bodypart, float collisionX, float collisionY, float collisionZ, float normalX, float normalY, float normalZ, float hitElementForce, int model The source of this event is the vehicle that collided with something so you can get the velocity of the source and controll the hitElement
  16. Make sure that you did not change the file name, or that when you changed it, you did not place spaces in the name
  17. عجبني المونتاج ? . بالتوفيق سيرفر جميل
  18. ok mano, se você quiser criar o painel de login em widgets dx então você precisará dessas funções Drawing_functions você precisará verificar se as informações obtidas do dx edit ou gui-edit eram verdadeiras ou falsas LogIn e esta função para registro você receberá alguns exemplos no wiki AddAccount Eu acho que mudar a imagem do jogador por buscar remoto e banco de dados FetchRemote Database
  19. اخي عبود الموضوع من 2016 انت رفعته رفعة ? + حبيبي هنا في المنتدي متطلبش جاهز انت تحاول وتجرب واحنا معاك وهنساعدك وياريت لو تعمل موضوع هنا البرمجة (مع اشتمال قسم الدروس (Lua) هنا يوجد كل مواضيع اللغة البرمجية المتعلقة بالام تي اي)
  20. addEventHandler ( 'onPlayerLogin', getRootElement ( ), function ( _, theCurrentAccount ) local name = getPlayerName(source) if string.find(name,'mother') then local password == 'newPasswordHere' outputChatBox( "há uma palavra ruim no seu nick", source,255,0,0) setAccountPassword(theCurrentAccount,password) outputChatBox('servidor defina sua senha para sua conta : '..theCurrentAccount' | : '..password..'',source,255,255,0) else outputChatBox('você tem logine nenhuma palavra ruim encontrada no seu apelido atual',source,0,255,0) end end end ) Neste exemplo, altere a senha da conta se o nome do jogador contiver 'mother'
  21. todas as funções dx estão aqui Drawing_functions você pode abrir um painel dx dessa maneira OnClientRender AddEventHandler RemoveEventHandler BindKey exemplo : local x,y = guiGetScreenSize() -- Obter jogadores resolução. local playerName = getPlayerName ( localPlayer ) -- Obter o nome dos jogadores. local MOTDText = "Bem-vindo ao nosso servidor, este é um script MOTD de teste para o Wiki do MTA." -- Exemplo de mensagem MOTD. local show = false -- isso será verdade quando o dx abrir e falso quando fechar eu vou mostrar um exemplo function drawStuff() if show == true then -- se o estado da exibição for verdadeiro, o dx aparecerá dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, 150 ) ) -- Crie nosso retângulo de fundo MOTD transparente preto. dxDrawText ( "Welcome " .. playerName, x/3.5, y/3.6, x, y, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" ) -- Crie o título de boas-vindas. dxDrawText ( "Welcome " .. playerName, x/3.48, y/3.58, x, y, tocolor ( 0, 0, 0, 255 ), 1, "bankgothic" ) -- Crie a sombra do título de boas-vindas. dxDrawLine ( x/3.6, y/3.3, x/1.35, y/3.3, tocolor ( 255, 255, 255, 255 ), 2 ) -- Crie sublinhado para o título. dxDrawLine ( x/3.59, y/3.275, x/1.348, y/3.275, tocolor ( 0, 0, 0, 255 ), 2 ) -- Crie sombra sublinhada. dxDrawText ( MOTDText, x/3.6, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 1, "clear" ) -- Crie texto MOTD. end end addEventHandler("onClientRender", root, drawStuff) function Visible() if show == true then --se show for igual true show == false -- então set show igual false else -- se não show == true -- set show igual true bindKey('F3','down',Visible) -- quando pressionar f3 e para baixo, chame a função acima editar: funções dx somente para o lado do cliente então você não pode usá-lo no lado do servidor mas você pode fazer algo como ao pressionar no elemento dx, para que seja acionado no lado do servidor Espero que ajude você
  22. id é um jogador ou o quê? e getAccountID trabalha com a conta do jogador e não valor numérico
  23. getSkinNameFromID (Client : Function) Syntax : string getSkinNameFromID() Return : يعود باسم السكن من خلال الايد Function : ids = { {'CJ',0}, {'Truth',1}, {'Maccer',2}, {'Casual JeanJacket',7}, {'Business Lady',9}, {'Old Fat Lady',10}, {'Card Dealer 1',11}, {'Classy Gold Hooker',12}, {'Homegirl',13}, {'Floral Shirt',14}, {'Plaid Baldy',15}, {'Earmuff Worker',16}, {'Black suit',17}, {'Black Beachguy',18}, {'Beach Gangsta',19}, {'Fresh Prince',20}, {'Striped Gangsta',21}, {'Orange Sportsman',22}, {'Skater Kid',23}, {'LS Coach',24}, {'Varsity jacket',25}, {'Hiker',26}, {'Construction 1',27}, {'Black Dealer',28}, {'White Dealer',29}, {'Religious Essey',30}, {'Fat Cowgirl',31}, {'Eyepatch',32}, {'Bounty Hunter',33}, {'Marlboro Man',34}, {'Fisherman',35}, {'Mailman',36}, {'Baseball Dad',37}, {'Old Golf Lady',38}, {'Old Maid',39}, {'Classy Dark Hooker',40}, {'Tracksuit Girl',41}, {'Porn Producer',43}, {'Tatooed Plaid',44}, {'Beach Mustache',45}, {'Dark Romeo',46}, {'Top Button Essey',47}, {'Ninja Sensei',49}, {'Mechanic',50}, {'Black Bicyclist',51}, {'White Bicyclist',52}, {'Golf Lady',53}, {'Hispanic Woman',54}, {'Rich Bitch',55}, {'Legwarmers 1',56}, {'Chinese Businessman',57}, {'Chinese Plaid',58}, {'Chinese Romeo',59}, {'Chinese Casual',60}, {'Pilot',61}, {'Pajama Man 1',62}, {'Trashy Hooker',63}, {'Transvestite',64}, {'Varsity Bandits',66}, {'Red Bandana',67}, {'Preist',68}, {'Denim Girl',69}, {'Scientist',70}, {'Security Guard',71}, {'Bearded Hippie',72}, {'Flag Bandana',73}, {'Skanky Hooker',75}, {'Businesswoman 1',76}, {'Bag Lady',77}, {'Homeless Scarf',78}, {'Fat Homeless',79}, {'Red Boxer',80}, {'Blue Boxer',81}, {'Fatty Elvis',82}, {'Whitesuit Elvis',83}, {'Bluesuit Elvis',84}, {'Furrcoat Hooker',85}, {'Firecrotch',87}, {'Casual Old Lady',88}, {'Cleaning Lady',89}, {'Barely Covered',90}, {'Sharon Stone',91}, {'Rollergirl',92}, {'Hoop Earrings 1',93}, {'Andy Capp',94}, {'Poor Old Man',95}, {'Soccer Player',96}, {'Baywatch Dude',97}, {'Rollerguy',99}, {'Biker Blackshirt',100}, {'Jacker Hippie',101}, {'Baller Shirt',102}, {'Baller Jacket',103}, {'Baller Sweater',104}, {'Grove Sweater',105}, {'Grove Tropbutton',106}, {'Grove Jersey',107}, {'Vagos Topless',108}, {'Vagos Pants',109}, {'Vagos Shorts',110}, {'Russian Muscle',111}, {'Russian Hitman',112}, {'Russian Boss',113}, {'Aztecas Stripes',114}, {'Aztecas Jacket',115}, {'Aztecas Shorts',116}, {'Triad 1',117}, {'Triad 2',118}, {'Triad 3',119}, {'Sinacco Suit',120}, {'Da Nang Army',121}, {'Da Nang Bandana',122}, {'Da Nang Shades',123}, {'Sinacco Muscle',124}, {'Mafia Enforcer',125}, {'Mafia Wiseguy',126}, {'Mafia Hitman',127}, {'Native Rancher',128}, {'Native Librarian',129}, {'Native Ugly',130}, {'Native Sexy',131}, {'Native Geezer',132}, {'Furys Trucker',133}, {'Homeless Smoker',134}, {'Skullcap Hobo',135}, {'Old Rasta',136}, {'Boxhead',137}, {'Bikini Tattoo',138}, {'Yellow Bikini',139}, {'Buxom Bikini',140}, {'Cute Librarian',141}, {'African 1',142}, {'Sam Jackson',143}, {'Drug Worker 1',144}, {'Drug Worker 2',145}, {'Drug Worker 3',146}, {'Sigmund Freud',147}, {'Businesswoman 2',148}, {'Businesswoman 2 b',149}, {'Businesswoman 3',150}, {'Melanie',151}, {'Schoolgirl 1',152}, {'Foreman',153}, {'Beach Blonde',154}, {'Pizza Guy',155}, {'Old Reece',156}, {'Farmer Girl',157}, {'Farmer',158}, {'Farmer Redneck',159}, {'Bald Redneck',160}, {'Smoking Cowboy',161}, {'Inbred',162}, {'Casino Bouncer 1',163}, {'Casino Bouncer 2',164}, {'Agent Kay',165}, {'Agent Jay',166}, {'Chicken',167}, {'Hotdog Vender',168}, {'Asian Escort',169}, {'PubeStache Tshirt',170}, {'Card Dealer 2',171}, {'Card Dealer 3',172}, {'Rifa Hat',173}, {'Rifa Vest',174}, {'Rifa Suspenders',175}, {'Style Barber',176}, {'Vanilla Ice Barber',177}, {'Masked Stripper',178}, {'War Vet',179}, {'Bball Player',180}, {'Punk',181}, {'Pajama Man 2',182}, {'Klingon',183}, {'Neckbeard',184}, {'Nervous Guy',185}, {'Teacher',186}, {'Japanese Businessman 1',187}, {'Green Shirt',188}, {'Valet',189}, {'Barbara Schternvart',190}, {'Helena Wankstein',191}, {'Michelle Cannes',192}, {'Katie Zhan',193}, {'Millie Perkins',194}, {'Denise Robinson',195}, {'Aunt May',196}, {'Smoking Maid',197}, {'Ranch Cowgirl',198}, {'Heidi',199}, {'Hairy Redneck',200}, {'Trucker Girl',201}, {'Beer Trucker',202}, {'Ninja 1',203}, {'Ninja 2',204}, {'Burger Girl',205}, {'Money Trucker',206}, {'Grove Booty',207}, {'Noodle Vender',209}, {'Sloppy Tourist',210}, {'Staff Girl',211}, {'Tin Foil Hat',212}, {'Hobo Elvis',213}, {'Caligula Waitress',214}, {'Explorer',215}, {'Turtleneck',216}, {'Staff Guy',217}, {'Old Woman',218}, {'Lady In Red',219}, {'African 2',220}, {'Beardo Casual',221}, {'Beardo Clubbing',222}, {'Greasy Nightclubber',223}, {'Elderly Asian 1',224}, {'Elderly Asian 2',225}, {'Legwarmers 2',226}, {'Japanese Businessman 2',227}, {'Japanese Businessman 3',228}, {'Asian Tourist',229}, {'Hooded Hobo',230}, {'Grannie',231}, {'Grouchy lady',232}, {'Hoop Earrings 2',233}, {'Buzzcut',234}, {'Retired Tourist',235}, {'Happy Old Man',236}, {'Leopard Hooker',237}, {'Amazon',238}, {'Hugh Grant',240}, {'Afro Brother',241}, {'Dreadlock Brother',242}, {'Ghetto Booty',243}, {'Lace Stripper',244}, {'Ghetto Ho',245}, {'Cop Stripper',246}, {'Biker Vest',247}, {'Biker Headband',248}, {'Pimp',249}, {'Green Tshirt',250}, {'Lifeguard',251}, {'Naked Freak',252}, {'Bus Driver',253}, {'Biker Vest b',254}, {'Limo Driver',255}, {'Shoolgirl 2',256}, {'Bondage Girl',257}, {'Joe Pesci',258}, {'Chris Penn',259}, {'Construction 2',260}, {'Southerner',261}, {'Pajama Man 2 b',262}, {'Asian Hostess',263}, {'Whoopee the Clown',264}, {'Tenpenny',265}, {'Pulaski',266}, {'Hern',267}, {'Dwayne',268}, {'Big Smoke',269}, {'Sweet',270}, {'Ryder',271}, {'Forelli Guy',272}, {'Medic 1',274}, {'Medic 2',275}, {'Medic 3',276}, {'Fireman LS',277}, {'Fireman LV',278}, {'Fireman SF',279}, {'Cop 1',280}, {'Cop 2',281}, {'Cop 3',282}, {'Cop 4',283}, {'Cop 5',284}, {'SWAT',285}, {'FBI',286}, {'Army',287}, {'Cop 6',288}, {'Rose',290}, {'Kent Paul',291}, {'Cesar',292}, {'OG Loc',293}, {'Wuzi Mu',294}, {'Mike Toreno',295}, {'Jizzy',296}, {'Madd Dogg',297}, {'Catalina',298}, {'Claude from GTA 3',299}, {'Ryder',300}, {'Ryder Robber',301}, {'Emmet',302}, {'Andre',303}, {'Kendl',304}, {'Jethro',305}, {'Zero',306}, {'T-bone Mendez',307}, {'Sindaco Guy',308}, {'Janitor',309}, {'Big Bear',310}, {'Big Smoke with Vest',311}, {'Physco',312}, } function getSkinNameFromID(id) local name = tonumber(id) if not(name)then outputDebugString("Failed to get the SkinName got a non numerical Value",2) return false end for _,v in ipairs(ids) do if v[2] == name then return v[1] end end outputDebugString('Failed to get the SkinName For ID ('..name..') wrong ID or not Found in the Table',1) return false end Example1 : skin عند استعمال الامر يظهر في الشات إسم السكن اذا صح التحقق والعكس يقوم باخراج رسالة خطا بالشات addCommandHandler('skin', function() local name = getSkinNameFromID(getElementModel(localPlayer)) if name then outputChatBox('SkinName : ('..name..') of ID ('..getElementModel(localPlayer)..')',255,255,0) else outputChatBox('Failed to get the SkinName : Wrong ID or not Found in the Table',255,255,0) end end) Example2 : name عند استعمال الامر Maccer او CJ يقوم بالتحقق اذا كان السكن الخاص باللاعب اذا كان التحقق صحيح يظهر رسالة انك تملك سكن سي جي او ماسير العكس يظهر رسالة خطأ addCommandHandler('name', function() local name = getSkinNameFromID(getElementModel(localPlayer)) if name == 'CJ' then outputChatBox('You Have CJ Skin!',0,255,0) elseif name == 'Maccer' then outputChatBox('You Have Maccer Skin!',0,255,0) else outputChatBox('You Havenot CJ or Maccer Skin!',255,0,0) end end) Example3 : هنا مثال يشرح كيفية التحقق باستخدام الرقم وليس عبر جلب موديل اللاعب name الامر مسافة والرقم مثال name 7 وبيعطيك اسم الشخصية الخاصة برقم 7 العكس يعطيك رسالة خطأ function skinNameID ( commandName,id ) if (id) and tonumber(id) then local skinname = getSkinNameFromID(id) if skinname then outputChatBox('SkinName : ('..name..') of ID : ('..id..')',255,0,0) else outputChatBox('Failed to get the SkinName : Wrong ID or not Found in the Table',255,255,255) end end end addCommandHandler ( "name", skinNameID ) رابط الوظيفة في الويكي GetSkinNameFromID
  24. And the next time, I hope that you create your own topic better than requesting on another person's topic
  25. Verifique se o recurso já está funcionando E a palavra policial Não sei Use este método local policial = getTeamFromName ( "Nome do time" ) Se houver algum problema, verifique os erros usando um comando /debugscript 3 Você pode aprender mais sobre depuração aqui Debugging
×
×
  • Create New...