-
Posts
239 -
Joined
-
Last visited
Everything posted by Seba500PLK
-
no errors
-
Now there is nothing in the gridlist
-
What did I do wrong? --Client function gridacc (acc) --Create the grid list element --local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) --Create a players column in the list local column = guiGridListAddColumn( accountGrid, "Player", 0.85 ) if ( column ) then --If the column has been created, fill it with players for id, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( accountGrid ) guiGridListSetItemText ( accountGrid, row, column, acc( player ), false, false ) end end end addEventHandler ( "onClientResourceStart", getResourceRootElement(), gridacc ) addEvent("updateGuis", true) addEventHandler("updateGuis", root, gridacc) --Server function update(client) local who = getPlayerFromName (client); local account = getPlayerAccount( who ); triggerClientEvent ( "updateGuis", getRootElement(), getAccountName ( account ) ) end
-
hi I know I need to use the trigger, but do not know how --Client local tab = {} local tabpanel = {} local label = {} local button = {} local edit = {} local player = localPlayer function gridlist() local screenWidth, screenHeight = guiGetScreenSize() window1 = guiCreateWindow(screenWidth * 0.24, screenHeight * 0.2, 771, 457, "TEST", false) guiWindowSetSizable(window1, false) guiSetVisible(window1,false) accountGrid = guiCreateGridList(9, 23, 249, 228, false, window1) guiGridListSetSelectionMode(accountGrid, 2) end addEventHandler("onClientResourceStart", resourceRoot, gridlist) addEventHandler("onClientResourceStart",resourceRoot, function() if not isElement(window1) then gridlist() end bindKey ( "F3", "down", openGui ) end ) function openGui() if not isElement(window1) then gridlist() end if not guiGetVisible(window1) then --stats() guiSetVisible ( window1, true ) showCursor(true) else guiSetVisible ( window1, false ) showCursor(false) end end function gridacc () --Create the grid list element --local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) --Create a players column in the list local column = guiGridListAddColumn( accountGrid, "Player", 0.85 ) if ( column ) then --If the column has been created, fill it with players for id, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( accountGrid ) guiGridListSetItemText ( accountGrid, row, column, getPlayerName( player ), false, false ) end end end addEventHandler ( "onClientResourceStart", getResourceRootElement(), gridacc )
-
thank you for everything, you have from me a huge plus
-
ok I was able to. And now to give yourself the points you need to enter: setElementData(getPlayerFromName("NAME"),"p_money",3)
-
Please help me anyone
-
like trying to do it is either "nil" or "0" help
-
7 line getAccountData(currentAccount, "p_money)) should getAccountData(currentAccount, "p_money"))
-
do not know too much on the triggers. please could you help? I'm sorry that so much of the time it takes --Client function getPlayerMoney ( ) local m = tonumber ( getElementData ( localPlayer, "p_money" ) ) if ( not m ) then m = 0 setElementData ( localPlayer, "p_money", 0 ) end return m end function setPlayerMoney ( money ) return setElementData ( localPlayer, "p_money", money ) end function givePlayerMoney ( money ) local c = getPlayerMoney ( localPlayer ) return setPlayerMoney ( localPlayer, c + money ) end local screenWidth, screenHeight = guiGetScreenSize() addEventHandler ( "onClientRender", root, function ( ) dxDrawText ( "Twoje PP: "..tostring ( getPlayerMoney ( ) ), screenWidth * 0.509 / 2, screenHeight * 0.022, screenWidth * 0.5 / 2, screenHeight * 0, tocolor ( 0, 0, 0, 255), 1, "bankgothic", "left", "top", false, false, true, true) dxDrawText ( "#FFC000Twoje PP: #FF4000"..tostring ( getPlayerMoney ( ) ), screenWidth * 0.506 / 2, screenHeight * 0.02, screenWidth * 0.5 / 2, screenHeight * 0, tocolor ( 2, 2, 214, 255), 1, "bankgothic", "left", "top", false, false, true, true) end ) --Server function onLogin(previousAccount, currentAccount) if not getAccountData(currentAccount, "p_money") or not getAccountData(currentAccount, "p_money") == nil then setAccountData(currentAccount, "p_money", 0) end end addEventHandler("onPlayerLogin", root, onLogin) function getPlayerMoney ( player ) local m = false local gPlayerAccount = getPlayerAccount(player) if (gPlayerAccount ~= false) and (isGuestAccount(gPlayerAccount) == false) then m = tonumber ( getAccountData ( gPlayerAccount, "p_money" ) ) if ( not m ) then m = 0 setAccountData ( player, "p_money", 0 ) end end return m end function getpoints ( player, command) local gPlayerAccount = getPlayerAccount(player) outputChatBox(tostring(getAccountData ( gPlayerAccount, "p_money" ))) end addCommandHandler ( "getp", getpoints )
-
ok, quit and join save my points, is another problem Check: http://imagizer.imageshack.us/v2/1920x1 ... Sk2UPU.png
-
i add a check point function: function getpoints ( player, command) local gPlayerAccount = getPlayerAccount(player) outputChatBox(tostring(getAccountData ( gPlayerAccount, "p_money" ))) end addCommandHandler ( "getp", getpoints ) Check: http://imagizer.imageshack.us/v2/1920x1 ... fbPaXy.png
-
Now I start to use
-
like what, add yourself these points by P -> Resources -> Execute command -> setElementData (getPlayerFromName ("Seba500PLK"), "p_money", 1) it badly or well?
-
player account logged and no Guest account.
-
did not work --Server function onLogin( player) if not getAccountData(player, "p_money") or getAccountData(player, "p_money") == nil then setAccountData(player, "p_money", 0) end end addEventHandler("onPlayerLogin", root, onLogin) function getPlayerMoney ( player ) local m = false local gPlayerAccount = getPlayerAccount(player) if (gPlayerAccount ~= false) and (isGuestAccount(gPlayerAccount) == false) then m = tonumber ( getAccountData ( gPlayerAccount, "p_money" ) ) if ( not m ) then m = 0 setAccountData ( player, "p_money", 0 ) end end return m end
-
i leave and join the sever reset points
-
I'm sorry but I can not understand
-
--Server function getPlayerMoney ( player ) local m = tonumber ( getAccountData ( player, "p_money" ) ) if ( not m ) then m = 0 setAccountData ( player, "p_money", 0 ) end return m end function setPlayerMoney ( player, money ) return setAccountData ( player, "p_money", money ) end function givePlayerMoney ( player, money ) local c = getPlayerMoney ( player ) return setPlayerMoney ( player, c + money ) end dont work, no saved
-
if someone can someone help me?
-
restart server, points reset
-
ok work, thanks
-
ok, thank you. Then the proof, because now my hosting does not work: /
-
Et-win Please help
-
I'm sorry if you offended
