Jump to content

๖ۣۜζ͜͡RapGod

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by ๖ۣۜζ͜͡RapGod

  1. I think you should fade the camera out so that the screen gets black, get this picture in the middle of the screen for some seconds then fade the camera back in, after the picture gets off the screen. Try using "fadeCamera()" for that. (Replying based of what i think i understood of ur msg)
  2. Hey, try adding the command as a parameter to the function aswell. I'm not sure if it will work like this, but i always do it when i add a command. Example: function revivir(source,cmd) --the code here. end addCommandHandler("test",revivir) If i'm wrong then feel free to correct me. Maybe i'd learn some things myself.
  3. Can you please state the problem and only the part that you're getting errors in? And also please use the <> icon in the tab so we can see your code in a better way.
  4. Sorry i misread your script,and posted a wrong comment. Please try using those <> to help us read your code in a better way(better view).
  5. Hello. Can u please show me some code so i could help you? At least state where you're facing a problem?
  6. Hello everyone. I'm actually curious about how to create an MTA database or a mysql/sql file and how to use them. Can anyone clarify or send me some kind of tutorial so i could learn abit about this? Thanks in advance
  7. Yes plz go ahead, but please try to explain the problem in a better way cause i'm unable to understand ur english(not being offensive tho)
  8. Try using after triggerClientEvent. setCameraTarget(player) fadeCamera(player, true) I'm on my phone so i can't try and test it for you, but that's the logic. You fade it out, then u should fade it in.
  9. I did not understand what the problem actually is. Can u please clarify? So we can have a clear vision and be able to help u.
  10. Because your skin is being set client side. Try using the setElementModel in the server side script. This should fix your problem.
  11. It's easy to create fire,but why do u need a health bar for? Instead try showing the players that have the fire deputy job, to see on the radar that a fire occured somewhere. The default fire health is already set by the gta game, that once it gets hit by water, it's health will start draining until it disappears. Unless u have another idea in mind, then state it down below.
  12. Well that's easy. You can do this: local skins = {1,2,3} --"nextSkin" is the created button in your window. function setSkin(button) local i = 1 if button == "left" then --if you left clicked the button. if i > #skins then --if it's bigger than the total skin number i= 1 -- set it back to 1. --do whatever u want here. else i = i+1 -- if i is not bigger than the table amount, then increment it. end end addEventHandler("onClientGUIClick",nextSkin,setSkin,false)
  13. I do not know much about MySQL, but to me it seems a connection problem. Maybe the given ip is wrong, or your sql server ain't online. Please, correct me if i'm wrong.
  14. Woww good job mate. Keep up the hard work!!
  15. Didn't i just help u with the fire thingy? Now u're requesting a full script?
  16. You're welcome anytime. If you need something else, feel free to start a new thread.
  17. Well i'm using a timer function so that the fire occurs by itself after some time has passed. Just so u don't have to type it manually. You dont need a loop to spawn a bigger fire. You can just use the size argument inside the createFire function after specifying the x y z of that fire. Check out how it's used(arguments): https://wiki.multitheftauto.com/wiki/CreateFire
  18. If u want to get a random position off the table then u dont need a loop. Instead u can use this: local rpos ={ [1]={ x = 0, y=0, z=0}, [2]={ x=1, y=1, z=1} } setTimer(function() local randomPicker= rpos[math.random(1,2)] createFire(randomPicker.x,randomPicker.y,randomPicker.z, the size here) outputChatBox("Fire started at "..randomPicker.x.." "..randomPicker.y.." "..randomPicker.z, root,255,0,0) end, time in milliseconds)
  19. I can't really understand what you actually want to do? If you want to set fire in the given locations( inside that table) and u want a timer for that so that it reapeats the same action every "x" moment, you should use setTimer for ur function. And get rid of the commandHandler, you don't need that for automatic functions(timer). Also i'm not sure about the arguments you've given to the createFire function. Also about the loop. You can use #rpos instead of manually writing what's inside the table. local rpos= { {x= 0, y= 0, z=0} } setTimer(function(), for i=1, #rpos do createFire(rpos[i].x,rpos[i].y,rpos[i].z,and u specify the size using the wiki instead of the command) outputChatBox("Fire started at "..rpos[i].x.." "..rpos[i].y.." "..rpos[i].z,root,r,g,b) end end)
  20. I do know about those stuff. But i already created an edf for my own gamemode "maps" that way they could be custom. But i'm unsure of how to retrieve the map informations step by step out of the map file without breaking anything. For example: My teams are parents and they contain elements which are spawnpoints, class(which is weapons and skins) and objective markers as if it's a tdm map. If i wanted to create a spawn selection window for the players to pick one on their own, i'm unsure how to use the same spawn selection area for all the maps that i have, but just with different skin id's and team names. (Hoping that i made my idea clear)
  21. Hello my dear MTA friends, and community. I am opening this topic because i am lost as a scripter and unsure of where to go and what to do. I've been learning Lua scripting(MTA related only) for 2/3 months straight now everyday. I do know how to create basic scripts and addEvents client and server side and triggerEvents. But the gamemode thing is new to me, and i have no references on wiki to look at since i'm not going to be using map manager. Can u please(pro scripters) provide me with some details on what should i aim first to get my gamemode finished while learning in a short time? And what should the steps be? Sorry for making this long tho. And if anyone has some free time and do like to go into discord and help me learn more, i'd be thankful.
  22. Hello, @M.Wizard, as much as i tried to guess what you're saying, is that you want to enter these texts in the Memo you created, by order. First Create the memo, Then list them by order 1 by 1 the way you want them to be. Unless you want someone else to enter it for you(which means a user). that's a simple code, i'm not sure if it will help you, but try it out. local panel = guiCreateWindow(x,y,width,height,"Panel",true) --Created The window(made it relative) (Define the x,y, width,height as you wish) guiSetVisible(myWindow,false) --set it to true if you want it to be visible. local myMemo = guiCreateMemo(x,y,width,height," ",true,panel) --Added the Memo to the window --You can create a table that contains all of your Messages. local message ={ {name="Hello"}, {name="Anything"}, {name="Test"}, {name ="1"} } --Now you can make a loop to list them all inside the memo. for i=1,#message do guiSetText(myMemo,message[i].name) end It should be this way for you to list them all, i haven't tested the code, but just to give you an idea of what to do.
  23. One more thing, is there a way to check if the player has admin powers via client side? because i don't want anyone to be able to open this panel.
  24. Good job IIYAMA, i tried it myself and it works perfectly fine!
×
×
  • Create New...