Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. local musicTable = { [ 'David Guetta - Where Dem Girls At' ] = 'http://199.167.195.194/wdga.mp3', [ 'Coldplay - Paradise' ] = 'http://199.167.195.194/pd.mp3', [ 'Coldplay - Viva la Vida' ] = 'http://199.167.195.194/vlv.mp3', [ 'Ana Malhoa - Danza Kuduro' ] = 'http://199.167.195.194/dk.mp3', [ 'Klaas - The Way' ] = 'http://199.167.195.194/tw.mp3', [ 'Basshunter - All I ever wanted' ] = 'gfx/music/bh-aiew.mp3', [ 'Whiz Khalifa - Black and Yellow' ] = 'gfx/music/wk-bay.mp3', [ 'Skrillex - My name is Skrillex ( Remix )' ] = 'gfx/music/sx-mnis.mp3', [ 'Italobrothers - Stamp on the Ground' ] = 'gfx/music/ib-sotg.mp3', [ 'Madcon - Freaky like Me' ] = 'gfx/music/mc-flm.mp3', [ 'Cut the Music - Greatest Deejay' ] = 'gfx/music/ctm-gd.mp3', [ 'No Name - Time`s Vortex' ] = 'gfx/music/tv.mp3', [ 'Manian - Welcome to the Club' ] = 'gfx/music/wttc.mp3', [ 'Bon Jovi - It`s my Life' ] = 'gfx/music/iml.mp3', [ 'Example - Changed the Way you Kissed Me' ] = 'gfx/music/ctwykm.mp3', [ 'Example - Kickstart ( Bar 9 Remix )' ] = 'gfx/music/e-ksb9rx.mp3', [ 'Ellie Goulding - Lights ( Remix )' ] = 'http://199.167.195.194/Lights.mp3', [ 'Arkasia - New World Disorder' ] = '', [ 'ATB - You are not Alone ( Remix )' ] = '' } The table. --create the table in the gridlist local column = guiGridListAddColumn(gui['list'],'Playlist',0.9); guiGridListClear(gui['list']); for name, url in pairs(musicTable) do local name = guiGridListAddRow(gui['list']); guiGridListSetItemText(gui['list'],name,column,tostring(name),false,false); end; The code. The names appear like numbers: 01,02,03,04,05... Why? oO
  2. drk

    local gui = {};

    LOL, isn't the problem I've solved the problem and it isn't what you said
  3. drk

    local gui = {};

    But I have Want a print?
  4. drk

    local gui = {};

    Aw, it client side. Now it working, I'm noob More one question, why when I load a image it says that isn't UTF-8 and I get this error: 'gfx/images/closeh.png:1:unexpected symbol near '?'' and don't load... Why? .-. I'm using MTA 1.3 release.
  5. drk

    local gui = {};

    I'm trying to make like this: local gui = {}; gui['form'] = guiCreateWindow( ... ); guiSetVisible(gui['form'],false); But when I debugscript, and I use the variable gui['form'] I get like this: 'Bad argument @ guiSetVisible (bad argument 1, ...)' When I use another variable like guiform or gui_form it work. Why it happens?
  6. LOL, stop copying spawn points from other maps ^^
  7. LOL, I don't understand what you are saying. Please explain better
  8. addEventHandler('onPlayerTarget',root, function(theTarget) local health = getElementHealth(theTarget) if (getElementType(theTarget) == "object") then setElementHealth(theTarget, health+1000) end end) I don't know if it's right, i've not tested it yet..
  9. Ah. I don't know if it's possible to set these objects damage proof. But in SA:MP if I set the vehicle health to more than 1000% It will be infinite health. Maybe its possible in MTA:SA...
  10. Destroyed by the client(player) or the server/script?
  11. Objects don't lose health Only players and vehicles. For players you can use setElementHealth to set a specified health, for vehicles you can use setVehicleDamageProof or setElementHealth too.
  12. I don't understand what you want. You want to set damaged proof in a object?
  13. drk

    Infopanel..

    localPlayer is default in mta for getLocalPlayer()?
  14. LOL Kenix? Why you need to see mtaserver.conf? sckatchof, I think that mysql_query don't exists in Lua. Use executeSQLInsert.
  15. I have to create gui's out of table and the children gui elements inside the table? Edit: And making a table global, like this? local guiElements = { } Sorry for being noob
  16. drk

    Infopanel..

    Try changing getRootElement() of triggerServerEvent to 'source'.
  17. Ah Then, I have to create the GUI elements like yours and add elements like you said ( items on the tab panel ) out of the table, right?
  18. drk

    Infopanel..

    Read the full topic... It says that 'source' don't work. But thanks to fixing my code =D Post the client side triggering event part.
  19. drk

    scoreboard

    LOL? Yonger you want to anyone create the full script to you?
  20. drk

    Infopanel..

    function adminCheck (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setWritable1", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin1", true ) addEventHandler( "admin1", getRootElement(), adminCheck ) function adminCheck2 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setReadable1", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin2", true ) addEventHandler( "admin2", getRootElement(), adminCheck2 ) function adminCheck3 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setWritable2", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin3", true ) addEventHandler( "admin3", getRootElement(), adminCheck3 ) function adminCheck4 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setReadable2", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin4", true ) addEventHandler( "admin4", getRootElement(), adminCheck4 ) function adminCheck5 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setWritable3", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin5", true ) addEventHandler( "admin5", getRootElement(), adminCheck5 ) function adminCheck6 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setReadable3", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin6", true ) addEventHandler( "admin6", getRootElement(), adminCheck6 ) function adminCheck7 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setWritable4", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin7", true ) addEventHandler( "admin7", getRootElement(), adminCheck7 ) function adminCheck8 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setReadable4", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin8", true ) addEventHandler( "admin8", getRootElement(), adminCheck8 ) function adminCheck9 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setWritable5", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin9", true ) addEventHandler( "admin9", getRootElement(), adminCheck9 ) function adminCheck10 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setReadable5", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin10", true ) addEventHandler( "admin10", getRootElement(), adminCheck10 ) function adminCheck11 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setWritable6", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin11", true ) addEventHandler( "admin11", getRootElement(), adminCheck11 ) function adminCheck12 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setReadable6", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin12", true ) addEventHandler( "admin12", getRootElement(), adminCheck12 ) function adminCheck13 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setWritable7", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin13", true ) addEventHandler( "admin13", getRootElement(), adminCheck13 ) function adminCheck14 (thePlayer) local account = getPlayerAccount ( thePlayer ) if isGuestAccount ( account ) then triggerClientEvent ( "loginRequired", getRootElement()) else local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "setReadable7", getRootElement()) else triggerClientEvent ( "justAdmins", getRootElement()) end end end addEvent( "admin14", true ) addEventHandler( "admin14", getRootElement(), adminCheck14 ) Who is element 'thePlayer' ? I've not tested it but it should work D:
×
×
  • Create New...