Chaos
Members-
Posts
299 -
Joined
-
Last visited
Everything posted by Chaos
-
no mate i forget add the resource to admin group that's why i edited it.
-
it's worked but i'm looking for unban event because when i want unban player then he can return to server with out ban.
-
hey, im trying to ban account so if player got ban then login with another pc with same account will get ban again but i'm looking for unban event because when i want unban player then he can return to server with out ban. function outputBan ( banPointer, responsibleElement ) account = getPlayerAccount(source) if account then setAccountData(account,"AccountBanned",true) outputChatBox("The account has been banned",root,255,0,0) end end addEventHandler ( "onPlayerBan", getRootElement(), outputBan ) addEventHandler("onPlayerLogin", root, function() account = getPlayerAccount(source) if account then if getAccountData(account,"AccountBanned") == true then banPlayer ( source, false, false, true, getRootElement ( ), 'You have been banned',0 ) end end end)
-
Thanks but can you give a simple example just to know how it will works?
-
hey, im trying to make a vehicle shop but how can i let players able to buy one more than car with setAccountData i tired to use setAccountData (getPlayerAccount (source), "SaveCar", tonumber(carid)) but it seems can load only one vehicle any help?
-
i need help with this.
-
Server : function giveMoney(player) local playerAccount = getPlayerAccount(player) if getAccountData(playerAccount, "CommandUsed") == false then givePlayerMoney(player,2000) outputChatBox("you got money $2000",player,0,255,0) setAccountData(playerAccount, "CommandUsed", true) timer = setTimer(setAccountData,60000,1,playerAccount,"CommandUsed",false) triggerClientEvent(player,"StartCount",player,timer) elseif getAccountData(playerAccount, "CommandUsed") == true then outputChatBox(" You have to wait 1 min to use this command again .",root,255,255,0) end end addCommandHandler("getmoney",giveMoney) Client: function Timeinfo(timer) Secs = math.ceil(getTimerDetails(timer)/ (1000) % 60 ) Mins = math.ceil(getTimerDetails(timer)/ (1000*60) % 60) Hours = math.ceil(getTimerDetails(timer)/ (1000*60*60) % 24 ) guiSetText(GUIEditor.button[5],Hours..":"..Mins..":"..Secs) setTimer(Timeinfo(timer),1000,0) end addEvent("StartCount", true) addEventHandler("StartCount", root, Timeinfo) i'm trying to get time details on button and update the text every 1 sec but it seems can't trigger timer from server side
-
Hi, Is there any way to create a .txt file in which we can save some data on the server side?
-
i just created this what i should do now ? GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(362, 184, 300, 400, "Animations", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(0.03, 0.08, 0.90, 0.69, true, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Animation", 0.9) GUIEditor.button[1] = guiCreateButton(0.03, 0.80, 0.90, 0.18, "Stop Animation", true, GUIEditor.window[1]) end )
-
I will try and tell you if I got problems
-
So can I use same animations.xml in freeroam to import?
-
But I don't know how to import animations from xml thing
-
hi, so i want to import animations panel from freeroam and make it open with bind alone is that possible ? function applyAnimation(leaf) if type(leaf) ~= 'table' then leaf = getSelectedGridListLeaf(wndAnim, 'animlist') if not leaf then return end end server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true) end function stopAnimation() server.setPedAnimation(g_Me, false) end wndAnim = { 'wnd', text = 'Set animation', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='animlist', width=230, height=290, columns={ {text='Animation', attr='name'} }, rows={xml='animations.xml', attrs={'name'}}, expandlastlevel=false, onitemdoubleclick=applyAnimation }, {'btn', id='set', onclick=applyAnimation}, {'btn', id='stop', onclick=stopAnimation}, {'btn', id='close', closeswindow=true} } }
-
addEventHandler( "onPlayerWasted", getRootElement(), function( killer ) givePlayerMoney( killer, 100 ) end)
-
i just need it stay on same place accurately
-
local x,y = guiGetScreenSize() local text = "Example" local scale = 2 local length = dxGetTextWidth(text,scale,"default-bold") local height = dxGetFontHeight(scale,"default-bold") function renderText() dxDrawText(text,x/1.05-length/2,y-height/1.20,x,y,tocolor(255,255,255,255),scale,"default-bold") -- centered text end addEventHandler("onClientRender",getRootElement(),renderText) look
-
function DXtext () local sWidth,sHeight = guiGetScreenSize() -- The variables dxDrawText("Hello World!",sWidth*0.668, sHeight*0.952, sWidth*0.715, sHeight*0.997,tocolor(0,255,255,175),1.0,"bankgothic","left","top",false,false,false) end addEventHandler ( "onClientRender", getRootElement(), DXtext ) i tried that example in wiki and still same problem
-
local screenW, screenH = guiGetScreenSize() function dxdraw() dxDrawText("EXAMPLE", (screenW - 206) / 2, (screenH - 59) /2.5 , ((screenW - 1028) / 2.1) + 1028, ((screenH - 97) / 2.5) + 97, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender",root,dxdraw)
-
look same problem not staying on same position
-
you mean like this ? local screenW, screenH = guiGetScreenSize() function dxdraw() dxDrawText("EXAMPLE", (screenW - 1028) / 2) + 1028, (screenH - 97) / 2.5) + 97 , 1028, 97, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender",root,dxdraw)
-
first pic it was 1024×768 sec pic it was 800×600 and i just used your code
-
it's not staying on same position