Jump to content

Plate

Members
  • Posts

    938
  • Joined

  • Last visited

Everything posted by Plate

  1. addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} Panel = guiCreateWindow(138,146,499,282,"",false) GUIEditor_Grid[1] = guiCreateGridList(363,59,127,195,false,Panel) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Players in F",0.-- s8) --> Players = guiCreateGridList(9,58,127,196,false,Panel) guiGridListSetSelectionMode(Players,2) guiGridListAddColumn(Players,"Players",0.-- s8) --> Add = guiCreateButton(177,60,135,49,"Add Player",false,Panel) Remove = guiCreateButton(174,132,142,51,"Remove Player",false,Panel) Leader = guiCreateButton(173,203,145,48,"Give Leader",false,Panel) addEventHandler ( "onClientGUIClick", Add,random, false ) -- El evento tiene que ir dentro de esta funcion. loadPlayers ( ) end ) function addP ( ) guiSetVisible ( Panel, true ) showCursor ( true ) end addCommandHandler("AFP",addP) function closePanel ( ) if guiGetVisible ( Panel ) then guiSetVisible ( Panel, false ) showCursor ( false ) end end addCommandHandler ( "CFP", closePanel ) function STARS ( ) triggerServerEvent ( "addST", localPlayer, accountName ) end addEventHandler("onClientGUIClick",Add,STARS, false) function loadPlayers ( ) guiGridListClear ( Players ) for index, player in ipairs ( getElementsByType ( "player" ) ) do guiGridListSetItemText ( Players, guiGridListAddRow ( Players ), 1, tostring ( getPlayerName ( player ) ), false, false ) end end addEventHandler ( "onClientPlayerJoin", root, loadPlayers ) addEventHandler ( "onClientPlayerQuit", root, loadPlayers ) addEventHandler ( "onClientPlayerChangeNick", root, loadPlayers ) function random() local playerName = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) triggerServerEvent("enviarVariable",localPlayer,playerName) end addEventHandler("onClientGUIClick",Add,random, false) addEvent("enviarVariable",true) addEventHandler("enviarVariable",root,function (playerName, accountName) local elPlayer = getPlayerFromName(playerName) local usuario = getAccountName ( getPlayerAccount ( nil ) ) if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) ) then if ( accountName ) then local pname = getPlayerName ( nil ) aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) outputChatBox ( tostring ( pname ) .." agrego a '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) end end end )
  2. ahh gracias pero como lo soluciono ^^ en lugar de eso que tengo que poner
  3. cuando lo empieso me dice Bad Argument : " getPlayerAccount" Bad Argument : "getAccountName" attempt to concatenate local "usuario" addEvent("enviarVariable",true) addEventHandler("enviarVariable",root,function (playerName) local elPlayer = getPlayerFromName(playerName) local usuario = getAccountName ( getPlayerAccount ( elPlayer ) ) if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) ) then if ( accountName ) then local pname = getPlayerName ( elPlayer ) aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) outputChatBox ( tostring ( pname ) .." agrego a '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) end end end )
  4. jaja nose es que este script me lo dio ElMota cuando yo pregunte eso del gui pero me die "badArgument" getPlayerAccount "bad argument" getAccountName "bad argument" local usuario (a boolean valvue)
  5. que esta mal en esto ? addEvent("enviarVariable",true) addEventHandler("enviarVariable",root,function (playerName) local elPlayer = getPlayerFromName(playerName) local usuario = getAccountName ( getPlayerAccount ( elPlayer ) ) if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) ) then if ( accountName ) then local pname = getPlayerName ( elPlayer ) aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) outputChatBox ( tostring ( pname ) .." agrego a '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) end end end )
  6. como podria hacer yo para darle esto https://community.multitheftauto.com/index.php?p= ... ls&id=5115 a un slothbot
  7. pero igual no funciona
  8. haci? function random() local playerName = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) triggerServerEvent("enviarVariable",localPlayer,playerName) end addEventHandler("onClientGUIClick",Add,random, false) addEvent("enviarVariable",true) addEventHandler("enviarVariable",root,function (playerName) local elPlayer = getPlayerFromName(playerName) local usuario = getAccountName ( getPlayerAccount ( elPlayer ) ) if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) ) then if ( accountName ) then local pname = getPlayerName ( elPlayer ) aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) outputChatBox ( tostring ( pname ) .." agrego a '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) end end end )
  9. no me funciono pero gracias
  10. es qe no entiendo pero voy a seguir intentando podrian corregir esto que no tengo ni idea de lo que hize function() level = dxDrawText("",686.0,158.0,746.0,166.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) dxDrawText("",682.0,143.0,749.0,153.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) dxDrawText("",633.0,142.0,663.0,167.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) dxDrawRectangle(628.0,136.0,128.0,35.0,tocolor(255,255,255,255),false) end ) function drawLevel() triggerServerEvent ("dvl", getLocalPlayer(), thePlayer) addEventHandler("onResourceStart",getRootElement(),drawLevel) server addEvent("dlv",true) addEventHandler("dlv",getRootElement(), function (thePlayer) exports["exp_system"]:getPlayerLevel(thePlayer) end)
  11. va bien hay? function NOSE() guiGridListSetItemText ( Players, row, Players, getPlayerName ( playeritem ), false, false ) PDat = guiGridListGetItemText ( Players, Players, Players ) elseif getRandomItem == 2 then PDat = guiGridListGetItemText ( Player, Players, Players ) end
  12. no entiendo como lo podria hacer u.u
  13. y como seria para hacer eso solid
  14. el debugscript dice esto bad argument addEventHandler[Expect element at argument 2 goot nil]
  15. hola hace poco hize un gui pero no funciona par agregar a las personas pero no funciona addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} Panel = guiCreateWindow(138,146,499,282,"Panel",false) GUIEditor_Grid[1] = guiCreateGridList(363,59,127,195,false,Faction) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Players in F",0.5) Players = guiCreateGridList(9,58,127,196,false,Faction) guiGridListSetSelectionMode(Players,2) guiGridListAddColumn(Players,"Players",0.5) Add = guiCreateButton(177,60,135,49,"Add Player",false,Faction) Remove = guiCreateButton(174,132,142,51,"Remove Player",false,Faction) Leader = guiCreateButton(173,203,145,48,"Give Leader",false,Faction) end ) function addP() guiSetVisible (Panel,true) showCursor(true) end addCommandHandler("AFP",addP) function closePanel() if guiGetVisible(Panel) then guiSetVisible(Panel,false) showCursor(false) end end addCommandHandler("CFP",closePanel) function STARS ( ) triggerServerEvent ( "addST", localPlayer, accountName ) end addEventHandler ( "onClientGUIClick", Add, STARS, false ) function loadPlayers ( ) guiGridListClear ( Players ) for index, player in ipairs ( getElementsByType ( "player" ) ) do guiGridListSetItemText ( Players, guiGridListAddRow ( Players ), 1, tostring ( getPlayerName ( player ) ), false, false ) end end addEventHandler ( "onClientResourceStart", resourceRoot, loadPlayers ) addEventHandler ( "onClientPlayerJoin", root, loadPlayers ) addEventHandler ( "onClientPlayerQuit", root, loadPlayers ) addEventHandler ( "onClientPlayerChangeNick", root, loadPlayers ) server addEvent ( "addST", true ) addEventHandler ( "addST", getRootElement(), function ( accountName ) local usuario = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) ) then if ( accountName ) then local pname = getPlayerName ( source ) aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) outputChatBox ( tostring ( pname ) .." agrego a '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) end end end )
  16. no funciona u.u expect to close "("at line 14 near end
  17. que esta mal de esto solid addEvent ("addST", true) addEventHandler ("addST", getRootElement(), function (playerSource, commandName, accountName) local usuario = getAccountName ( getPlayerAccount ( playerSource ) ) if isObjectInACLGroup ("user."..usuario, aclGetGroup ( "LiderFTFP" ) ) then if accountName then local pname = getPlayerName( playerSource ) aclGroupAddObject (aclGetGroup("FTFP"), "user."..accountName) outputChatBox(tostring(pname) .." agrego a '"..accountName.."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) end end ) function STARS() triggerServerEvent ("addST", getRootElement(), playerSource, commandName, accountName) end addEventHandler ("onClientGUIClick", Add, STARS, false)
  18. listo solid exellente igual hize otro gui jaja necesito que en la columna Players in F aparescan los players con grupo acl especial y me falta hacer el serverside con tiggerServerEvent
  19. Hola alguien me podria decir que esta mal en esto GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} panel = guiCreateWindow(217,172,327,240,"Panel",false) Players = guiCreateGridList(24,46,133,162,false,Players) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) add = guiCreateButton(189,58,112,35,"Add Player",false,panel) remove = guiCreateButton(188,125,113,41,"Remove Player",false,panel) guiWindowSetMovable(panel,false) guiWindowSetSizable(panel,false) guiSetVisible(panel,false) function addP() guiSetVisible (panel,true) showCursor(true) end addCommandHandler("AFP",getRootElement(),addP) function closePanel() if guiGetVisible(panel) then guiSetVisible(panel,false) showCursor(false) end end addCommandHandler("CFP",getRootElement(),closePanel)
  20. Plate

    Musica

    jaja tengo menos idea de crear bases de datos no hay algun lugar donde la pueda descargar ya echa
  21. Plate

    Musica

    listo ElMota ya instale el XAMPP y ahora? que tengo que hacer
  22. Plate

    Musica

    sisi lo tengo pero no se como hacerlo andar u.u
  23. Plate

    Musica

    esta es la pagina https://github.com/mabako/mta-paradise/ pero what?
×
×
  • Create New...