Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/12/18 in all areas

  1. Sim, precisará de um loop, que passa por todos os jogadores e verifica quais deles são policiais. Se for policial, manda a mensagem pra ele. qth? O que é isso?
    1 point
  2. Primeiramente vamos ao que está errado no seu código. Por se tratar de um código server-side, está faltando parâmetros na sua função, como thePlayer. Que fica ali dentro do ( ). addCommandHandler é uma função que não possui source. Para obter o jogador que digitou o comando, você precisa obrigatoriamente declarar um parâmetro de função, como foi dito no item anterior. Por isso que nada dará certo a partir da segunda linha, pois source não existe. Você tem uma condição vazia em aberto e não chega a fechá-la. Se você pelo menos usasse o /debugscript 3, já teria percebido erros de sintaxe. No seu outputChatBox, você está declarando root como segundo argumento, isso significa que a mensagem está indo pra todo mundo, inclusive quem não é policial. Também há erros de indentação no seu código. Vou deixar o seu código do jeito que está, mas corrigido para ficar melhor de entender: function chat (thePlayer) local jogador = getPlayerName (thePlayer) local zona = getElementZoneName (thePlayer) outputChatBox ( "O jogador #8B0000"..jogador.." #FFFFFFestá precisando da policia em "..zona.."", getRootElement(), 255, 255, 255, true) -- Vai mandar isso pra todo mundo. end addCommandHandler ("190", chat) E @OverKILL, seus exemplos estão errados. No primeiro exemplo a mensagem está sendo enviada pra todo mundo, inclusive pra quem não é policial. No segundo exemplo não está sendo entregue aos policiais, só pro próprio jogador que executou o comando.
    1 point
  3. Well, it's like this. Requirements :- good electricity. Time. Hot coffee cup. Method :- Click on the objects button on map editor. Then select all objects from the dropdown list on top of the window. Then put your one finger on down arrow. And eyes on monitor. Click on the uppermost object of the objects list. Then press downarrow since you find your object. If you got any unhappy, drink some coffee. Now do it again and again until you reach the target. GOOD LUCK !!
    1 point
  4. Coloque a tabela inteira numa variável e passe essa variável como argumento no triggerClientEvent. Então no client você poderá acessar esse argumento e obter a table. Exemplo maroto: Server-side: tabela = { [1] = "Elemento 1", [2] = "Elemento 2", [3] = "Elemento 3" } addCommandHandler ("eae", function (thePlayer, cmd) triggerClientEvent (thePlayer, "recebeTable", thePlayer, tabela) end) Client-side: addEvent ("recebeTable", true) addEventHandler ("recebeTable", getRootElement(), function (tabelaQualquer) outputChatBox ("Tabela recebida do server:") for i, valor in ipairs (tabelaQualquer) do outputChatBox (i.." = "..valor, 255, 255, 255) end end) (código não testado, avise se houver erros) Boa sorte.
    1 point
  5. السلام عليكم ورحمة الله وبركاته كل عام وانتم بالف خير # بسم الله الرحمان الرحيم , مود التخيم فكرة جديد كليا # @#Al3aGraB<3 هام : حقوقك فكرة الخيمة لاخ طبعا هاذا المود كان في سيرفري وفي بعض الاشخاص قلدو المود وطالما مقفل سيرفري قلت بشاركم في المود وانشاء الله يعجبكم طبعا بسوي تحديثات له طبعا مشان تاكيد حقوقي للمود هاذا الرابط للمود زمان كنت مركبه في سيرفر # نبدء في المهم # هام : للانتقال الى التخيم اكتب في الشات ( تخيم ) , لوضع الخيمة وانزال الدباب اكتب في ف8 ( خيمة ) وشكرا صور المود انشاء الله يكون عاجبكم [ واخيرا التحميل للتحميل اضغط هنا [ كل عام وانتم بخير
    1 point
  6. Hello @Tony Brand ! I'm not well known on databases of MTA server. I'm here to answer your last question. According to my knowledge, I thought it can be happen. I can give you a suggestion regarding this. That is; you should use 'setTimer' function on some of player's data changed. Meanwhile, as you say, if player change his money continuously, server had a many load to do. So, you should use a timer. When player change his money, timer run and about 6/7 seconds after, server executes the database function to save player's money. Since database save function run on 6/7 seconds interval, player can continuously change his data on that time period. Then server will save current money one time on database. So I think this way is efficient.
    1 point
  7. This is huge, how can i thank you except a like?? Thank you so much @DeadthStrock for all this help man, i can imagine its hard fixing all this buggs im throwing in the thread. Holy :~! ++++rep
    1 point
  8. Você disse que tentou fazer algo, mas está dando erro. Cadê o código pra gente verificar o erro? Qual erro que aparece no /debugscript 3?
    1 point
  9. Também tem aquele helicóptero que fica na água.
    1 point
  10. Só usar getVehicleType e verificar se o veículo não é um barco. local posX, posY, posZ = 527.23, 631.9, 2.19 -- Posição teste onde o veículo será movido ao colidir na água. function vehicleRender () if getPedOccupiedVehicle (localPlayer) then if isElementInWater (getPedOccupiedVehicle (localPlayer)) then setElementPosition (getPedOccupiedVehicle (localPlayer), posX, posY, posZ) end end end addEventHandler ("onClientVehicleEnter", root, function (thePlayer, seat) if thePlayer == localPlayer then if seat == 0 then if getVehicleType (source) ~= "Boat" then addEventHandler("onClientRender", root, vehicleRender) end end end end) addEventHandler ("onClientVehicleExit", root, function (thePlayer, seat) if thePlayer == localPlayer then removeEventHandler("onClientRender", root, vehicleRender) end end)
    1 point
  11. Você pode usar um setTimer para destruir o veículo após tantos segundos que ele ficou vazio e também pode cancelar esse timer quando alguém entrar no veículo. No entanto, não existe uma função que detecta quando um veículo é criado. Se o player criar o veículo e não entrar nele, o timer não será criado. server-side vehTimer = {} addEventHandler ("onVehicleExit", getRootElement(), function (thePlayer, seat, jacker, forcedByScript) local counter = 0 for seat, player in pairs(getVehicleOccupants(source)) do counter = counter + 1 end if counter == 0 then -- Se o veículo ficou vazio após esse player sair dele, então: vehTimer[source] = setTimer (destroyElement, 5000, 1, source) -- destroi o veículo após 5 segundos que alguém saiu dele. end end) addEventHandler ("onVehicleEnter", getRootElement(), function (thePlayer, seat, jacked) if isTimer (vehTimer[source]) then killTimer (vehTimer[source]) end end)
    1 point
  12. Não sei se esta é a melhor maneira de fazer isso, pois não achei nenhuma função que detecte colisão na água. Então usei um onClientRender para ficar verificando o tempo todo se o veículo está na água ou não. Para não ficar verificando de maneira desnecessária, quando o jogador sai do veículo, ele deve parar de verificar. E quando ele entrar em um veículo como motorista, começa a verificar novamente. client-side local posX, posY, posZ = 527.23, 631.9, 2.19 -- Posição teste onde o veículo será movido ao colidir na água. function vehicleRender () if getPedOccupiedVehicle (localPlayer) then if isElementInWater (getPedOccupiedVehicle (localPlayer)) then setElementPosition (getPedOccupiedVehicle (localPlayer), posX, posY, posZ) end end end addEventHandler ("onClientVehicleEnter", root, function (thePlayer, seat) if thePlayer == localPlayer then if seat == 0 then addEventHandler("onClientRender", root, vehicleRender) end end end) addEventHandler ("onClientVehicleExit", root, function (thePlayer, seat) if thePlayer == localPlayer then removeEventHandler("onClientRender", root, vehicleRender) end end)
    1 point
  13. Difícil entender. Os scripts não possuem indentação.
    1 point
  14. ياخي ليه احبك ؟؟ ههههههههههههه اياك ان تفهم غلط بالنسبة لي الناس الي اتعرفت عليها من اول ما دخلت اللعبة وهم مب كلهم بس اغلبهم موجودين بالمنتدي هنا @*RayaN-Alharbi. @MR.StoRm @ibrahim# @[T]|O|[P]George @Rakan# @#,xiRocKyz @Master_MTA @#Soking @Abdul KariM @Aln3mani @iMr.WiFi..! @SuperX @#StrOnG_,) @*AnGeL @#SnpêŘ @MrKAREEM @TOUNSI | ا̍ڸــڛۣــ؏ــٰٱ̍دہ @#5Mr'aLMuteRi. والي نسيته بالقلب
    1 point
  15. شف انت كلامك غلط بمعنى الكلمة الفرق بينا و بين الاجانب هو الفكر الي عند الحكومه و التأسيس عند المعلمين لو ما في واسطه و تحكم غربي بلعرب كان الحين ما زلنا مثل زمان و تذكر ان العرب و المسلمين هم من طوروا البشريه من عباد حجر الى خير الامم
    1 point
  16. GALAXY And there we go again, I'm proud to present another theme for this amazing game, it's called GALAXY and I did it for space lovers. This time I didn't work in a interface because players are using mainly the default one and it won't be worth to do so. In-Game it looks fantastic! How to install: 1. Download the file.2. Go to your MTA directory3. Put all the content in MTA/cgui/images4. Replace all items5. Enjoy! Download link: Mediafire Thanks for reading! Zebra
    1 point
  17. I want someone my server programming in Exchange for money but to have a professional with the evidence and images of exclusively lesbian
    0 points
×
×
  • Create New...