drk
Members-
Posts
1,607 -
Joined
-
Last visited
Everything posted by drk
-
Learn and you will know.
-
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 )
-
Obviously, it shows only 1 time. You need update the text of the label.
-
smth dude -.- Stop being noob and post here the error.
-
LOL? ISN'T THAT A ERROR????????????
-
LOL To edit with 2 people: Open Server -> Start Editor -> Others players join and Edit What the 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 )
-
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 )
-
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 )
-
Dude, copy Solidsnake14 first code. It should work properly.
-
looooooool He is saying you to copy him code and test dude. Not to post old here.
-
I think not. When I made a simple statistics system I used [[ ]] on it and worked.
-
-- 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.
-
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 )
-
Good job but you need add more deco
-
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...
-
call ( getResourceFromName ( "scoreboard" ), addScoreboardColumn, "Column 1", root, 10 ) Where 10 is the width. idk if it's the right syntax..
-
@@Bazoookaaa You need put scoreboard start line before admin panel.
-
Is in mtaserver.conf scoreboard starting before admin resource???
