Best-Killer
Members-
Posts
494 -
Joined
-
Last visited
Everything posted by Best-Killer
-
Syntax bool triggerServerEvent ( string event, element theElement, [arguments...] ) ---------- triggerServerEvent( "Coords", getRootElement(),localPlayer, guiGetText(GUIEditor.edit[3]), guiGetText(GUIEditor.edit[2]), guiGetText(GUIEditor.edit[1]) )
-
function test () outputChatBox ( "No hejka", source, 255, 255, 255, true ) end addEventHandler ( "onPlayerSpawn", getRootElement(), test ) or addEventHandler ( "onPlayerSpawn", getRootElement(), function() outputChatBox ( "No hejka", source, 255, 255, 255, true ) end ) 2 works fine
-
Thx Work For me ^^ Thanx too bro
-
Hello, how can I sort table date ! if we have in table 2017-01-21, 2017-01-22 and i draw them in dxtext for example .... it's will show like 2017-01-21 2017-01-22 i want it 2017-01-22 2017-01-21
-
Client side function only works with the server the player is connected to it's means the featchremote only from server ip right ?? and if my server is localhost what should ip i use to make it work ??
-
but i don't enderstand it ye it's catching table
-
hello guys please an example of FetchRemote Client Side please (images remote ) i tried with that but it's not work addEventHandler("onClientResourceStart", resourceRoot, function() local f = fetchRemote("https://www.countries-ofthe-world.com/flags-normal/flag-of-Germany.png", function(data, err) if(err == 0) then local f = fileCreate(v[3]) fileWrite(f, data) fileClose(f) outputChatBox("Passed") else outputChatBox("error") end end, "", false) end)
-
Hhhhh i like all your words all right hahahaha there is no errors in debug ^^ and thx (Sloved)
-
usernames = {} function onLogin ( player, user, pass ) local account = getAccount ( user, pass ) local accblock = accountBlocked(user) if ( account ~= false ) then if accblock == "0" then return end outputChatBox(accblock) if isTimer(cooldown) then return end cooldown = setTimer(function() end, 1000, 1) if (logIn ( client, account, pass ) == true) then triggerClientEvent ( client, "SAEGLogin:hideLogin", client ) setElementData(player,"AccountData:Username",tostring(user)) setElementData ( player, "AccountData:Serial", s ) setElementData ( player, "AccountData:IP", ip ) else triggerClientEvent ( client, "setWarning", client, "Something went wrong while logging!", 255, 0, 0 ) end else triggerClientEvent ( client, "setWarning", client, "Invalid login details!", 255, 0, 0 ) end end addEvent( "SAEGLogin:onLogin", true ) addEventHandler( "SAEGLogin:onLogin", root, onLogin ) function accountBlocked(acc) accblocked = false query = exports.NGsql:db_query ( "SELECT * FROM accountdata WHERE Username=? LIMIT 1", tostring(acc)) for i, v in ipairs (query) do accblocked = v["Blocked"] end if not accblocked then return false end return accblocked end what's worng with my code guys ?? pff the player can login if the account is blocked
-
use : logIn
-
already i use that in the scoreboard but you didn't understand bro :v if is there 1 play vip in game all players will be vip in scoreboard and see function test (p,cmd) isPlayerVIP(p) end addCommandHandler("aa",test) i'm testing for see it when fixed
-
another code : function test (p,cmd) isPlayerVIP(p) end addCommandHandler("aa",test) function isPlayerVIP(p) local acc = getAccountName ( getPlayerAccount ( p ) ) query = exports.NGsql:db_query ( "SELECT * FROM vips_data WHERE acc=? ", tostring(getPlayerID(getIDAccount(acc)))) if ( type ( query ) ~= "table" or #query < 1 ) then return outputChatBox("None") else return outputChatBox(tostring(query[1]["level"])) end end what i got with that ?? if no one is vip ig then when player type /aa and he's not vip will get None and when is there Player Vip ig then other player type aa (and he's not Vip) he will get vip level of the other player in the chat pfffffff what i want ?? if the player used /aa and he's not vip he get None and if he's vip player he get his level in the chat
-
function test (p,cmd) isPlayerVIP(p) outputChatBox(tostring(isPlayerVIP(p))) end addCommandHandler("aa",test) function isPlayerVIP(p) query = exports.NGsql:db_query ( "SELECT * FROM vips_data WHERE acc=? ", tostring(getPlayerID(getIDAccount(acc)))) for _, vip in ipairs(query) do return tostring(vip["level"]) end return "None" end if there player have vip all players will be have vip what is the problem pff
-
use this better function cursorPosition(x, y, w, h) if (not isCursorShowing()) then return false end local mx, my = getCursorPosition() local fullx, fully = guiGetScreenSize() cursorx, cursory = mx*fullx, my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end
-
this the first time i hear that
-
this will work commandTimer = {} function Armor(thePlayer, commandName) if isTimer(commandTimer[getPlayerSerial(thePlayer)]) then return outputChatBox( "Armor: You can't use this command right now ! You must wait "..math.floor(getTimerDetails(commandTimer[getPlayerSerial(thePlayer)])/1000).." seconds to use it again!",thePlayer, 255, 0, 0) end setPedArmor ( thePlayer, 30 ) commandTimer[getPlayerSerial(thePlayer)] = setTimer(function () end, 175000, 1) end addCommandHandler("armor", Armor)
-
you can save the stats with sql or SetAccountData , GetAccountData example : function test (p) testss = "we got the data !!" playeraccount = getPlayerAccount(p) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in setAccountData (playeraccount,"name",testss) end end addEventHandler("onPlayerLogin",test) function test1 (_, playeraccount ) if ( playeraccount ) then local balalbalbal = getAccountData ( playeraccount, "name" ) if (balalbalbal) then outputChatBox ("data = "..balalbalbal.."") end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), test1 ) addEventHandler("onPlayerLogout",test1) this just example with other stuff .... it's not with pedstats Good luck
-
wrong section ... please post it here : https://forum.multitheftauto.com/forum/99-spanish-español/
-
bro i didn't understand please explain more to me ?
-
my gamemode is nerd gaming but i'm developering it please any help me guys? pfffff function deleteOldBans() local deletion = {} for i, ent in pairs(bans) do if (ent[5] ~= -1 and (ent[4] + ent[5]) - getRealTime().timestamp <= 1) then table.insert(deletion, ent[1]) table.remove(bans, i) outputDebugString(""passed pfffff"") end end if (#deletion >= 1) then for _, val in ipairs(deletion) do exports.NGsql:db_exec("DELETE FROM `bans` WHERE `srl` = ?", val) end end end if the ent[5] (Duration) = -1 the database will be deleted pff what is the problem !!! NOTE: if (ent[5] ~= -1 and (ent[4] + ent[5]) - getRealTime().timestamp <= 1) then ...... i tried with changing it to : if (ent[5] ~= -1 and (ent[4] + ent[5]) - getRealTime().timestamp <= 0) then but still same problem please help me guys
-
not public and not leaked i'm making it and i'm not pro at scripting so i need help
-
if the duration is 0 or -1 the database will be deleted pls help pfff
-
try it by your self you will not learn if didn't try it try and post your code then we will help you