Jump to content

pino-boy

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by pino-boy

  1. changed gridMaps = guiCreateGridList(17,51,315,285,false) guiGridListSetSortingEnabled(gridMaps,false) guiGridListAddColumn(gridMaps,"Map name",0.9) addEventHandler( "onClientGUIClick", gridMaps, loadMaps ) Debug
  2. did no understand, what do you mean?
  3. Hello,I have a problem in the list of maps maps no appear gridMaps = guiCreateGridList(17,51,315,285,false) guiGridListSetSortingEnabled(gridMaps,false) guiGridListAddColumn(gridMaps,"Map name",0.9) addEventHandler ( "onClientGUIClick", gridMaps, updateMapLabels ) function loadMaps(gamemodeMapTable, gamemode, map) guiGridListClear(gridMaps) if gamemodeMapTable then aGamemodeMapTable = gamemodeMapTable for id,gamemode in pairs (gamemodeMapTable) do if (gamemode.name == "Race") then for id,map in ipairs (gamemode.maps) do local row = guiGridListAddRow ( gridMaps ) guiGridListSetItemText ( gridMaps, row, 1, map.name, false, false ) guiGridListSetItemData ( gridMaps, row, 1, map.resname) totalServerMaps = totalServerMaps+1 if (string.find(map.name,"[DM]",1,true)) then totalDmMaps = totalDmMaps+1 elseif (string.find(map.name,"[DD]",1,true)) then totalDdMaps = totalDdMaps+1 end updateMapLabels(1) end end end end end function updateMapLabels(updateMode) if updateMode == 1 then guiSetText(lblTotalMapsOnServer,"Total maps on the server: "..totalServerMaps) guiSetText(lblTotalDmMaps,"Total DM Maps: "..totalDmMaps) guiSetText(lblTotalDdMaps,"Total DD Maps: "..totalDdMaps) else local row,column = guiGridListGetSelectedItem(gridMaps) local mapName = guiGridListGetItemText(gridMaps,row,1) if mapName == "" then guiSetText(lblSelectedMapName,"N/A") guiSetText(lblSelectedMapAuthor,"N/A") else guiSetText(lblSelectedMapName,mapName) if string.find(mapName,"[DM]",1,true) then guiSetText(lblSelectedMapAuthor,"Deathmatch") elseif string.find(mapName,"[DD]",1,true) then guiSetText(lblSelectedMapAuthor,"Destruction Derby") elseif string.find(mapName,"[FUN]",1,true) then guiSetText(lblSelectedMapAuthor,"Fun map") else guiSetText(lblSelectedMapAuthor,"UNKNOWN") end end end end
  4. Test ....... function onClick () local x, y = guiGetScreenSize () fx = 30 fy = 251 edit_Login = guiCreateEdit(tx,ty,280, 35,"",false ) guiSetFont(edit_Login,"default-bold-small") edit_password = guiCreateEdit(tx,ty+80,280,35,"",false ) guiSetFont(edit_password,"default-bold-small") guiEditSetMaxLength ( edit_Login,25) guiEditSetMaxLength ( edit_password,25) guiEditSetMasked ( edit_password, true ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), onClick ) function Win() local x, y = guiGetScreenSize () sx = x sy = y + 400 tx = 20 ty = 200 dxDrawRectangle ( tx, 200, 300, 25, tocolor ( 0, 255, 0, 255 ) ) dxDrawRectangle ( tx, ty, 300, 350, tocolor ( 0, 0, 0, 155 ) ) dxDrawText ( "Nick", 20+10, sy*0.2+20, sx, sy, tocolor ( 255, 255, 255, 255 ), 1.5, "default-bold") dxDrawText ( "Password", 20+10, sy*0.2+100, sx, sy, tocolor ( 255, 255, 255, 255 ), 1.5, "default-bold") end addEventHandler ("onClientRender", getRootElement(), Win )
  5. pino-boy

    Hello !!!

    Client GUIEditor = { button = {} } addEventHandler("onClientResourceStart",resourceRoot, function() myWindow = guiCreateWindow ( 0, 0.1, 1.0, 0.7, "test-panel", true ) guiSetVisible(myWindow, false) buttonRace = guiCreateButton ( 0.44, 0.31, 0.15, 0.24, "Race", true, myWindow ) buttonClose = guiCreateButton ( 0.43, 0.71, 0.15, 0.24, "Close", true, myWindow ) addEventHandler("onClientGUIClick",buttonRace,Click,false) addEventHandler("onClientGUIClick",buttonClose,close,false) end ) function Click( ) setElementDimension( localPlayer, 1 ) outputChatBox( tostring ( getElementDimension ( localPlayer ) ) ) triggerServerEvent( "racestart", localPlayer, localPlayer ) guiSetVisible( myWindow, false ) showCursor( false ) guiSetInputEnabled( false ) end function close( ) guiSetVisible(myWindow, false) showCursor(false) guiSetInputEnabled(false) end function open( ) guiSetVisible(myWindow, true) showCursor(true) guiSetInputEnabled(true) end bindKey ( "F2", "down", open )
  6. pino-boy

    Hello !!!

    addEventHandler("onClientGUIClick",button[1],Click,false)
  7. pino-boy

    Hello !!!

    Client function Click( ) setElementDimension ( localPlayer, 2 ) outputChatBox ( tostring ( getElementDimension ( localPlayer ) ) ) triggerServerEvent("racestart",localPlayer ) guiSetVisible(myWindow, false) showCursor(false) guiSetInputEnabled(false) end -------------------------------------------------- Server function Racestart (hitElement) if ( isElement ( hitElement ) and getElementType ( hitElement ) == "player" ) then setElementData (hitElement,"gamemode","[gamemodes]/[race]/race", true) end end addEvent("racestart", true) addEventHandler( "racestart", getRootElement(), Racestart )
  8. pino-boy

    Hello !!!

    Help Please please please
  9. pino-boy

    Hello !!!

    No Work the problem and I am trying to activate the game mode in another dimension but will not
  10. pino-boy

    Hello !!!

    I know that it takes more lines, but the problem this this line, tried to correct, i could not, and I came here to ask for help setElementData (source,"gamemode","[gamemodes]/[race]/race", true)
  11. pino-boy

    Hello !!!

    but not a feature race can also be play, cmd, deathmatch, etc. ... and that the problem is not activating the gamemode type setElementData (source ,"gamemode","[gamemodes]/[play]/play", true) setElementData (source ,"gamemode","[gamemodes]/[deathmatch]/deathmatch", true) I just wanted to know why not activate the gamemode if not can respond here send me a private message (Please)
  12. pino-boy

    Hello !!!

    then you can not help me here ! Private message ?
  13. pino-boy

    Hello !!!

    I am trying to activate the race gamemode in dimension (2), but not activating this gamemode race was in clienteSide tried to put ServerSide and gave this error I've got two weeks trying to find out why this problem
  14. pino-boy

    Hello !!!

    I took a look in wiki https://wiki.multitheftauto.com/wiki/SetElementData function Racestart (source) setElementData (source,"gamemode","[gamemodes]/[race]/race", true) end addEvent("start", true) addEventHandler( "start", getRootElement(), Racestart )
  15. pino-boy

    Hello !!!

    you mean, I have to create a game mode all (create a race gamemode?)
  16. pino-boy

    Hello !!!

    this line is no working I tried many things and nothing What is missing ???? setElementData (localPlayer,"gamemode","[gamemodes]/[race]/race", true) function Click( ) setElementDimension ( localPlayer, 2 ) outputChatBox ( tostring ( getElementDimension ( localPlayer ) ) ) setElementData (localPlayer,"gamemode","[gamemodes]/[race]/race", true) guiSetVisible(myWindow, false) showCursor(false) guiSetInputEnabled(false) end
  17. pino-boy

    Hello !!!

    hello I have a problem in this part is not working no enable race gamemode Help-Me setElementData (localPlayer,"gamemode","[gamemodes]/[race]/race", true)
×
×
  • Create New...