-
Posts
1,491 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Walid
-
Try this it should work function adminPrivateChat(plr, cmd, ...) local accName = getAccountName ( getPlayerAccount ( plr ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Supporters" ) ) then local message = table.concat({...}, " ") for index, players in pairs(getElementsByType("player")) do if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(players)), aclGetGroup ( "Supporters" ) ) then outputChatBox("#000000(CST Supporter) "..getPlayerName(plr).. ": #FFFFFF"..message, players, 255, 255, 255, true) end end end end
-
no, you need to use guiGridListGetItemText. local playerName = guiGridListGetItemText(gridThing,row,Column) local player = getPlayerFromName(playerName) if player then end and the outputChatBox must be server side.
-
Simply because textRadio it's not defined here.
-
أنت لست بحاجة الى أن تضع اسم السلاح و ايديه just you can use one of them getWeaponIDFromName() or getWeaponNameFromID()
-
-- functions guiGridListGetItemText() takePlayerMoney() guiStaticImageLoadImage() -- Events onClientGUIClick
-
Try this it should work -- Client side -- Client side local weaponshopmarker1 = createMarker( 1302, -1377, 12.7, "cylinder", 1, 0, 0, 255, 255) GUIEditor = { button = {}, staticimage = {}, progressbar = {}, window = {} } function showweap1() GUIEditor.window[1] = guiCreateWindow(247, 140, 291, 393, "LORENZ WEAPON SHOP TEST", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF1100FF") guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateButton(162, 73, 92, 66, "M4 ($5000)", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(162, 255, 92, 63, "MP5 ($3000)", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF003B") GUIEditor.staticimage[1] = guiCreateStaticImage(23, 71, 107, 63, "m4.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(23, 255, 105, 63, "Smp5.png", false, GUIEditor.window[1]) showCursor(true) -- events addEventHandler("onClientGUIClick", GUIEditor.button[1], buy1,false) end function weaponshop1() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addEventHandler("onClientMarkerHit", weaponshopmarker1, showweap1) function buy1 () if (source == GUIEditors.button[1]) then showCursor(true) triggerServerEvent ("givem4", localPlayer) end end -- Server side function giveweaponm4() if ( getPlayerMoney (source) >= 5000 ) then takePlayerMoney(source, 5000) giveWeapon (source,31,150,true) end end addEvent("givem4",true) addEventHandler("givem4", root, giveweaponm4)
-
As far as i know you cant because the ground is not an element.
-
replace element with player here
-
try to use my code
-
-- Server side Example with Command function checkAccountsData(player) newTable = {} for k,v in ipairs(getAccounts()) do -- Example account name , cash etc ... local name = getAccountName(v) local exp = -- account data here local cash = -- the same here table.insert(newTable,{name,exp,cash}) end triggerClientEvent(player, "accounts.showGUI",player, newTable) end addCommandHandler("accounts",checkAccountsData) -- Client side accountMng = { accountList = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() accountMng.window[1] = guiCreateWindow(0.22, 0.20, 0.55, 0.62, "Account Management", true) guiWindowSetMovable(accountMng.window[1], false) guiWindowSetSizable(accountMng.window[1], false) guiSetAlpha(accountMng.window[1], 1.00) guiSetVisible(accountMng.window[1],false) accountMng.accountList[1] = guiCreateGridList(44, 45, 961, 515, false, accountMng.window[1]) guiGridListAddColumn(accountMng.accountList[1], "Account name", 0.3) guiGridListAddColumn(accountMng.accountList[1], "EXP", 0.2) guiGridListAddColumn(accountMng.accountList[1], "Cash", 0.2) guiGridListAddColumn(accountMng.accountList[1], "IP", 0.2) accountMng.button[2] = guiCreateButton(443, 591, 169, 43, "Delete account", false, accountMng.window[1]) guiSetProperty(accountMng.button[2], "NormalTextColour", "FFAAAAAA") accountMng.button[3] = guiCreateButton(942, 623, 103, 35, "Close", false, accountMng.window[1]) guiSetProperty(accountMng.button[2], "NormalTextColour", "FFAAAAAA") end ) function AccountsData(Thetable) guiSetVisible(accountMng.window[1], not guiGetVisible(accountMng.window[1])) showCursor(guiGetVisible(accountMng.window[1])) guiGridListClear(accountMng.accountList[1]) for k,v in pairs(Thetable) do local row = guiGridListAddRow(accountMng.accountList[1]) guiGridListSetItemText(accountMng.accountList[1], row,1, tostring(v[1]), false, false) -- Column 1 guiGridListSetItemText(accountMng.accountList[1], row,2, tostring(v[2]), false, false) -- Column 1 guiGridListSetItemText(accountMng.accountList[1], row,2, tostring(v[3]), false, false) -- Column 1 end end addEvent("accounts.showGUI", true) addEventHandler('accounts.showGUI',root,AccountsData)
-
No i will never help you like that try to do it by yourself then post your code here , and i will help you
-
:3 example -- Server side function checkAccountsData() newTable = {} for k,v in ipairs(getAccounts()) do -- Example account name , cash etc ... local accname = getAccountName(v) local exp = -- account data here local cash = -- the same here table.insert(newTable,{accname,exp,cash}) end triggerClientEvent(client, "accounts.showGUI", client, newTable) end -- add your event handler
-
use getAccounts ()
-
Show me full code.
-
1 millisecond = 0.001 seconds next time before you start posting questions like that use google I recommend you to check this : Milliseconds to Seconds Conversion Calculator
-
use "onClientHUDRender" event. like this addEventHandler("onClientHUDRender", root, dxDrawLoginPanel) You need to read this Game Processing Order
-
there is many things like that Watch this
-
You are welcome
-
Copy and past my code . i edit it it's working fine
-
function showits(player) Words = {} for i , v in pairs (Table) do local word = tostring(v) table.insert(Words,{word}) end triggerClientEvent(player,"showit",player,Words) end addCommandHandler("showit",showits) Edit
-
Try this without using getWordsTable function function showits(player) Words = {} if isElement(player) then for i , v in pairs (Table) local word = tostring(v[1]) table.insert(Words,{word}) end triggerClientEvent(player,"showit",player,Words) end addCommandHandler("showit",showits)
-
post debugscript here
-
-- Check your resolution or put the window "center" function addWordToGridList(Table) guiSetVisible(window1,true) showCursor(true) for i, v in pairs (Table) do local row = guiGridListAddRow(gridlist1) guiGridListSetItemText (gridlist1, row, collumn1,tostring(v[1]),false, false) end end addEvent("showit",true) addEventHandler("showit",root,addWordToGridList)