Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. drk

    Need help

    Fuuuuu! Are you kidding me??????? I posted the correct code here and you've not used it! addEvent ( "buySkin", true ) addEventHandler ( "buySkin", root, function ( fSkin ) if ( getPlayerMoney ( source ) >= 350 ) then setElementModel ( source, fSkin ) setElementData ( source, "clothesSkin", fSkin, true ) outputChatBox ( "You have sucessfully bought the skin!", source, 255, 255, 255, false ) else outputChatBox ( "You don't have enough money!", source, 225, 0, 0, false ) end end )
  2. drk

    trigger problem

    Obviously, it shows only 1 time. You need update the text of the label.
  3. drk

    Need help

    Show Server-side.
  4. drk

    Need help

    smth dude -.- Stop being noob and post here the error.
  5. drk

    Need help

    LOL? ISN'T THAT A ERROR????????????
  6. drk

    Need help

    Post all the error.
  7. LOL To edit with 2 people: Open Server -> Start Editor -> Others players join and Edit What the problem??
  8. That's not showroom dude.
  9. drk

    trigger problem

    You need learn Lua dude. It's a mess. addEvent ( "GUIwins", true ) addEventHandler ( "GUIwins", root, function ( wins ) if ( wins ) then local winslabel = guiCreateLabel ( 49,72,246,21,wins,false,GUIEditor_Tab[1]) setTimer ( guiSetText, 5000, 1, winslabel, "" ) end end ) addEvent ( "GUIpoints", true ) addEventHandler ( "GUIpoints" ,root, function ( points ) if ( points ) then local pointslabel = guiCreateLabel ( 54,101,246,21,points,false,GUIEditor_Tab[1]) setTimer ( guiSetText, 5000, 1, pointslabel, "" ) end end ) addEvent ( "GUIsecond", true ) addEventHandler ( "GUIsecond",root, function ( second ) if ( second ) then local secondlabel = guiCreateLabel ( 98,131,246,21,second,false,GUIEditor_Tab[1]) setTimer ( guiSetText, 5000, 1, secondlabel, "" ) end end ) addEvent ( "GUIthird", true ) addEventHandler ( "GUIthird", root, function ( third ) if ( third ) then local thirdlabel = guiCreateLabel ( 88,160,246,21,third,false,GUIEditor_Tab[1]) setTimer ( guiSetText, 5000, 1, thirdlabel, "" ) end end )
  10. drk

    Need help

    Client-side: addEventHandler( 'onClientGUIClick', root, function( ) if ( source == Buttonbuyskin ) then assert( Sgrid, 'Grid list not exists' ) local nRow = guiGridListGetSelectedItem( Sgrid ) if ( nRow and nRow ~= -1 ) then local finalskin = guiGridListGetItemText( Sgrid, nRow, 1 ) assert( finalskin, 'Variable finalskin is false or nil.' ) triggerServerEvent ( 'buySkin', localPlayer, tonumber ( finalskin ) ) outputChatBox("You have successfully bought the skin!",source,225,255,255) else if isTimer ( timer ) then killTimer ( timer ) end guiSetText ( LabelTNS, 'Error: Please select a skin from the list.' ) timer = setTimer ( guiSetText, 3000, 1, LabelTNS, skinmsglabel ) end end end ) Server-side: addEvent("buySkin", true) addEventHandler("buySkin", root, function ( skin ) if ( getPlayerMoney ( source ) >= 350 ) then setElementModel ( source, tonumber ( skin ) ) setElementData ( source, "clothesSkin", skin, true ) outputChatBox ( "You have successfully bought the skin!", source, 225, 255, 255 ) else outputChatBox("You dont have enough money!",source,225,0,0) end end )
  11. drk

    Need help

    addEvent ( "buySkin", true ) addEventHandler ( "buySkin", root, function ( finalskin ) if (getPlayerMoney(source) >= 350) then setElementModel ( source, finalskin ) setElementData ( source, "clothesSkin", finalskin, true ) -- it's "finalskin" not "fnalskin" takePlayerMoney( source, 350 ) end end )
  12. drk

    Need help

    Dude, copy Solidsnake14 first code. It should work properly.
  13. drk

    Need help

    looooooool He is saying you to copy him code and test dude. Not to post old here.
  14. drk

    SQL Table

    I think not. When I made a simple statistics system I used [[ ]] on it and worked.
  15. drk

    SQL Table

    -- Your code if ( not executeSQLQuery [[ SELECT * FROM vehicles WHERE owner = 'Draken' AND id = '" .. idCode .. "' ]] ) then -- Buy the vehicle and assign the ID else -- Put your code here to generate new id then check again if id exists already end Good idea is create a function to generate a id then use the while loop to check if generated id exists.
  16. drk

    alc Group Show

    exports [ "scoreboard" ]:addScoreboardColumn ( "Group" ) local group = "" addEventHandler ( "onPlayerLogin", root, function ( _, account ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Admin" ) ) ) then group = "Admin" setElementData ( source, "Group", tostring ( group ) ) elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Console" ) ) ) then group = "Console" setElementData ( source, "Group", tostring ( group ) ) elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "SuperModerator" ) ) ) then group = "Super Moderator" setElementData ( source, "Group", tostring ( group ) ) elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Moderator" ) ) ) then group = "Moderator" setElementData ( source, "Group", tostring ( group ) ) end end )
  17. Good job but you need add more deco
  18. drk

    alc Group Show

    Sorry, my mistake exports [ "scoreboard" ]:addScoreboardColumn ( "Group" ) local group = "" addEventHandler ( "onPlayerLogin", root, function ( _, account ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Admin" ) ) ) then group = "Admin" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Console" ) ) ) then group = "Console" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "SuperModerator" ) ) ) then group = "Super Moderator" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Moderator" ) ) ) then group = "Moderator" end setElementData ( source, "Group", tostring ( group ) ) end ) idk if is any function to get group name...
  19. call ( getResourceFromName ( "scoreboard" ), addScoreboardColumn, "Column 1", root, 10 ) Where 10 is the width. idk if it's the right syntax..
  20. @@Bazoookaaa You need put scoreboard start line before admin panel.
  21. Is in mtaserver.conf scoreboard starting before admin resource???
×
×
  • Create New...