Jump to content

Headshot4Fun

Members
  • Posts

    124
  • Joined

  • Last visited

Everything posted by Headshot4Fun

  1. I Din't succeed, looks like the EXACT time the player minimizes it bugs
  2. Oh! How specific, i can't belive i haven't found this1Thank you for the help, when i finish the anti interior bug (and if it works) i will post in the community
  3. Well, here it goes: I need help to make/find some specific function that can detects if the grand theft auto windows its ACTIVED, actived window means some window that the user its using NOW, maximized or minimized. Because i am trying to make a script that detects if the gta windows its actived and if its isn't the it sets the player camera to another interior, this can be useful to avoid interior camera bug. Sorry for my english, not from USA
  4. So, is there a way to make a mta server send information do a php page and vide-versa? I Tryed php sdk but the exemple only returns [0] in the php page. Im running in a vps, so everything is localhost here I just need an small exemple, so i can understand it. I Tried wiki exemples but they are like SQL exemples, impossible for noobs to learn.
  5. So, i was wondering how they do work. Because no matter what i tried, no results. So, is there an exemple about how to create a scrollpane, make it work with a scroolbar and add an label in the scrollpane please. I Tried wiki but seems imposible to understand + i don't speak english very right Edit: Oh, now i understand, i tryed this by myself, if you want to learn to try this, admins, close topic please. You can run this on runcode, its on the wiki. crun window = guiCreateWindow(5,5,130,150,"",false) scrollpane = guiCreateScrollPane(0,0,130,150,false,window) crun for i=0,20 do guiCreateLabel(5,i*20,90,20,"Headshot4Fun x"..i,false,scrollpane) end
  6. I Only used 3 words. The rest are numbers and symbols...@topic: I Like sparta
  7. i used 3 words + 01000001011011100110010000100000011001110111010101100101011100110111001100100000 0111011101101000011000010111010000111111001000000100111001101111011101110010000001101001001000 0001100001011011010010000001110101011100110110100101101110011001110010000001100010011010010110 1110011000010111001001111001001000010010000001011001011001010111001101101000001000010010000001 0000010110111001100100001000000110001001101001011011100110000101110010011110010010000001101001 0111001100100000011011010110000101100100011001010010000001101111011101010111010000100000011011 1101100110001000000110111001110101011011010110001001100101011100100111001100100001001000000101 000001110010011011110110001001101100011001010110110100111111 ( numers and symbols are not words... and so do binary... problem?)
  8. This should work, happens in serverside and trigger all the players ( play the sound for everybody ) Server function player_Wasted ( ammo, attacker, weapon, bodypart ) if not attacker == source then -- If it is not a suicide then if ( weapon == 16 ) -- and if the weapon is 16 ( granede ) triggerClientEvent ( getRootElement(), "perfect", getRootElement()) -- Trigger this to every client. end end end Client addEvent("perfect",true) -- Creates the event handler function perfect() -- Play for everybody local sound = playSound("Perfect.mp3") setSoundVolume(sound, 0.5) end addEventHandler("perfect",getRootElement(),perfect) -- Triggers this event handler This should work, else, post /debugscript 3 Edit now with notes so you can understand better what the hell is happening
  9. Worked, thanks man. Now i tested with some of my friend and it worked.Thanks bro ;D
  10. Its not an function error, theres a missing ")" in this function, this part is right ( in terms of lua sintax ). But about scripting i can't say nothing, because i don't have the full script. Sometimes the debugscript gets the wrong line...
  11. I Don't even know what you are doing, but when we are using if we use "==" not just one "=", but im not sure if this will work, try, elseif not, post /debugscript 3 function consoleSetNosFiringStyle() if (g_Settings.ControlStyle == "normal") then g_Settings.ControlStyle = "nfs" elseif (g_Settings.ControlStyle == "nfs") then g_Settings.ControlStyle = "hybrid" elseif (g_Settings.ControlStyle == "hybrid") then g_Settings.ControlStyle = "normal" if saveSettingsToFile() then outputGuiPopup("Your NOS control style has been set to " ..tostring(settingName)) end end end addCommandHandler("noscontrol", consoleSetNosFiringStyle) addCommandHandler("nos", consoleSetNosFiringStyle)
  12. Headshot4Fun

    Video

    No, but you can make the video using images. For every frame save as a pic. Save every pic with the name of the last one plus one, exemple: 1.png, 2.png, 3png... Then keep changing them (x=x+1) every render (onClientRender)
  13. Oh, what a idiot am i... changing it... I Know, but for some reason i forgot it. Well, thats what happens when you try to script a gamemod at 3:00 am.Edit shit, i can't just make it works. it returns the --fail when should return --true, and also, doen't return --true. Can some one help me to make this function, it should searches a accountData in all accounts and return false if someone have it, and true if noone haves it. Heres the full relevant code: function checarConta(nome) local resultado = {} for i,v in pairs (getAccounts()) do if getAccountData(v,"char.nome") == tostring(nome) then return else table.insert(resultado,v) end end outputChatBox(resultado[1],source) if resultado[1] then --resultado={} outputChatBox("Fails",source) elseif not resultado[1] then outputChatBox("Works",source) setElementDimension ( source, 0) setPlayerName ( source,tostring(nome) ) local UsuarioCn = getPlayerAccount(source) setAccountData(UsuarioCn,"char.passouNoTutorial",true) setAccountData(UsuarioCn,"char.nome",nome) triggerClientEvent ( source, "DetectarNomeWin", source) end end addEventHandler ( "checarConta", getRootElement ( ), checarConta)
  14. So, this should work, after all, but debugscript keep saying: ERROR: ... server.lua:48: attempt to call a table value But the fun part, is that THATS what im trying to do... heres relevantpart the code. This basically checks a account data in all accounts, compare them if they are the same you input ( nome ) and add them to a table ( resultado ) then it checks if theres results, if theres results: -- fail, else -- works! function checarConta(nome) local resultado = {} for i,v in getAccounts() do if getPlayerData(v,"char.nome") == nome then table.insert(resultado,v) return else end end if resultado[1] then -- Fail elseif not resultado[1] then -- Win! end end addEventHandler ( "checarConta", getRootElement ( ), checarConta) Im trying to make this way so there is no floods, because otherwise, i would receive alot of -- works and only one --fail if there is one.
  15. Don't take this as offtopic, but lol, 1360 is the X resolution of my screen.Now admin/mod please close it or i will keep making offtopic posts here D:
  16. Hm, i get it.Thanks JR and Solid for helping me to solve this puzzle. Now i have everything that my server needs to work!
  17. Exactly, so i can detect if the name is already in use.
  18. here goes the problem. Im making a rpg server, and im scripting like everything... anyway this is the real problem: my account system works like that: 1. You create your account 2. Choose your charater name 3. And we save the charater name in your account (setAccountData) Now, how can i detect if this name is already in use by another account, because getAccountData/setAccountData only works when the player is LOGGED IN. Is there another way? Because I Tried XML they told me XML its not the best idea because it can lag as hell the server, and mysql i don't understand the wiki exemples... are they trolling me? Thanks!
  19. 1337 because i liked 17 50 1 101
  20. Nice story bro.By The way, if you don't have time to learn lua, try study a little everyday, you can't just learn everything in 1 hour or something like that.
  21. Understand like that: Server functions/events = what runs in the server, the host... Client functions/events = what runs in your game, your gta... There are some functions that only work for server, and some only work for client. Exemple; the function kickPlayer only works via server-side, now why? Security! dxDraw functions only work in client, now why? Performance. And in not english too, im brazilian, and i lern by my own, and so you will do.
×
×
  • Create New...