
Weii.
Members-
Posts
48 -
Joined
-
Last visited
Everything posted by Weii.
-
playSound("sound.mp3") --or playSound3D("sound.mp3",x,y,z)
-
addEventHandler("onClientGUIClick", label, function() --change label end , false) It is same as buttons
-
local minutes = 5 --here change how many u want setTimer ( function ( ) local vehicles = getElementsByType ( "vehicle" ) if ( #vehicles > 0 ) then for _, vehicle in ipairs ( vehicles ) do local player = getPedOccupiedVehicle ( vehicle ) if ( not player ) then destroyElement ( vehicle ) end end end end , minutes * 60000, 0)
-
local account = tostring(getElementData ( source, "username" )) this should be like local account = tostring(getElementData ( player, "username" )) I think
-
do outputChatBox(toJSON(datas)) and post here
-
check if he has car like if (#datas == 0) then -- You have no car end
-
addEventHandler ( "onPlayerCommand", root, function ( command ) if ( isPlayerMuted(source) ) then if (command ~= "report") then cancelEvent ( ) end end end )
-
Try removing a priority at job like exports['scoreboard']:scoreboardAddColumn( "job" , getRootElement() , 20, "job")
-
exports['scoreboard']:scoreboardSetColumnPriority( "Name" , 2) -- here should be uppercase Name exports['scoreboard']:scoreboardAddColumn( "id" , root , 20, "id" , 1 ) I've tryed stuff and that works Proof:
-
exports['scoreboard']:scoreboardAddColumn( "id" , getRootElement() , 20, "id" , 0 ) Maybe this will work, happend to me before that I had column before name, I can't realy remember how I made it
-
Good job, I will check it out
-
Thanks IIYAMA! I just use it for this example, I use exports to my mysql resource...
-
if (getPlayerTeam(source)) then r,g,b = getTeamColor(getPlayerTeam(source)) outputChatBox ( "#FF0000* [Owner] "..RGBToHex(r,g,b) .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) end function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end
-
I have a question if I add a mysql into looping function will cause server to lag ? I can't realy test it, but if there would be 50 players on server will server lagg? Code looks someting like that: function test() for index, player in ipairs(getElementsByType("player")) do dbQuery(con, "UPDATE ....") end end
-
You can either check for every group with this if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then or you can simply use if (hasObjectPermissionTo(source, "function.kickPlayer", false)) then
-
function zapiszEkwipunek() testing = {} for k,v in pairs( Plecak )do for i=1, wysokoscY do if not (Plecak[k][i] == false) then table.insert(testing, v) end end end return testing end -- and they save it like inventoryJson = toJSON(zapiszEkwipunek()) -- and get it from json inventoryTable = fromJSON(inventoryJson)
-
Don't know what you meant, but try spawning vehicle in server side!
-
function checkHeal() for index, value in ipairs (getElementsByType("player")) do local health = getElementHealth(value) if (health and health < 100) then setElementHealth(value,health+5) end end end setTimer(checkHeal,1000,0)
-
local otherPlayer = exports["ID_System"]:getPlayerFromPartialName(thePlayer, otherPlayer, true) if (not otherPlayer) then return end Try that, I think it should work