
Plate
Members-
Posts
938 -
Joined
-
Last visited
Everything posted by Plate
-
Hola tengo un problema con un mi script que me ayudo alex pero me da bad argument en getTeamFromName y en guiGridListGetItemText client function deteam() local team = guiGridListGetItemText(teamList, row, columnA) triggerServerEvent("Move", getLocalPlayer(), team) end addEventHandler("onClientGUIClick", mover, deteam, false) server function setTeam(player, teamName) local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then setPlayerTeam ( player , theTeam ) end end addEvent("Move", true) addEventHandler("Move",getRootElement(), setTeam)
-
Lo que esta en la gridlist?no entendi eso PD: la gridlist tiene todos los teams que se crean en el sv no 1 en especifico
-
Hola necesito ayuda nose como borrar un team desde una gridlist y tambien quiero mover a un player a un team pero no me sale probe asi local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then setPlayerTeam ( player , theTeam ) con el evento obiamente
-
No lo quita? a que te referis
-
usa el extra_health function godmode(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then exports.extra_health:setElementInvulnerable(source, true) end end addCommandHandler("godmode", godmode)
-
Ahora me da bad argument en el label y en el getElementData aparte no le da la vida al boss
-
Tenes que usar el extra_health de Castillo(SolidSnake14) [url=https://community.multitheftauto.com/index.php?p=resources&s=details&id=5195]https://community.multitheftauto.com/index.php?p= ... ls&id=5195[/url] function Nemesisbymanawydan ( ) baz = createObject ( 360, -1935.5480957031, 665.44055175781, 48, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( -1935.5480957031, 665.44055175781, 47.0, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Perras las matare, Si bienen!",getRootElement(), 255, 255, 255, true ) local myBlip = (createBlipAttachedTo ( nemesi, 0 )) attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) triggerClientEvent ( "nsound", root ) triggerClientEvent ( "nemesismissel", root ) setTimer( function() exports.extra_health:setElementExtraHealth(nemesi, 900) -- es para darle mas de 200 de vida con el setElementHealth le podes dar 200 nada mas end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,6000)) -- 120000, 150000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFkilled Nemesis, congratulations",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 1000, 1) -- 60000 time for nemesis respawn in milliseconds-- end end)
-
function setweapon() local ID = getSlotFromWeapon() setPedWeaponSlot(localPlayer, ID) end addEventHandler("onClientGUIClick", equipar, setweapon, false) y tambien probe con function setweapon() local name = getWeaponNameFromID() local ID = getSlotFromWeapon(name) setPedWeaponSlot(localPlayer, ID) end addEventHandler("onClientGUIClick", equipar, setweapon, false)
-
Bad argument getSlotFromWeapon y setPedWeaponSlot
-
Primero probre con onColShapeHit y despues con onClientResourceStart pero igual no aparece el label que dice el getElementData
-
No aparece el label que dice "getElementData(colshape,"zona") y tampoco spawnea el boss
-
server side: local colshape = createColRectangle ( 103.88594818115, 1302.0729980469, 220, 200 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel zombiesMatados = 0 function zona ( ) if ( isElementWithinColShape ( source, colshape ) ) then zombiesMatados = ( zombiesMatados + 1 ) if ( zombiesMatados == 1 ) then if ( not isElement ( slothbot1 ) ) then slothbot1 = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random(300, 302), 0, 0, ex, 38, "hunting", true ) myBlip = createBlipAttachedTo ( slothbot1, 23 ) end end end end addEventHandler ( "onZombieWasted", getRootElement(), zona ) addEventHandler("onBotSpawn",getRootElement(),zona) function restartear ( ) if ( isElementWithinColShape ( source, colshape ) ) then zombiesMatados = 0 end end addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted",getRootElement(), restartear ) addEvent ( "onBotWasted", true ) function alto() setElementData(colshape,"zona",high) end addEventHandler("onResourceStart",getRootElement(),alto) function setzonerage() setElementData(colshape,"zona",medium) if getElementData(colshape,"zona",medium) then setElemntData(colshape,"zona",low) end end addEventHandler("onBotWasted",getRootElement(),setzonerage) function sethealth() if getElementData(colshape,"zona",high) then exports.extra_health:setElemntExtraHealth(slothbot1, 10000) elseif getElementData(colshape,"zona",medium) then exports.extra_health:setElementExtraHealth(slothbot1, 7500) elseif getElementData(colshape,"zona",low) then exports.extra_health:setElementExtraHealth(slothbot1, 5000) end end addEventHandler("onBotSpawn",getRootElement(),sethealth) clientside: GUIEditor_Label = {} GUIEditor_Label[1] = guiCreateLabel(562,513,146,30,"Nivel de zona :",false) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Label[2] = guiCreateLabel(709,516,90,32, getElementData(colshape,"zona"),false) guiSetFont(GUIEditor_Label[2],"sa-header")
-
Hace como 2 horas que estoy probando y me sale siempre lo mismo Bad Argument setPedWeaponSlot y getSlotFromWeapon function setweapon() local ID = getSlotFromWeapon(name) setPedWeaponSlot(source, ID) end addEventHandler("onClientGUIClick", equipar, setweapon, false)
-
Y como puedo poner la municion de cada arma que tiene el usuario y que cuando toque el boton "equipar" se le cambie a esa arma
-
Gracias solid pero si yo pongo un suponer /prueba /prueba /prueba (muchas veces) empiesa a aparecer muchas veces el arma que tengo equipada en la gridlist
-
GUIEditor_TabPanel = {} GUIEditor_TabPanel[1] = guiCreateTabPanel(315,183,290,299,false) Tab_Armas = guiCreateTab("Armas",GUIEditor_TabPanel[1]) lista = guiCreateGridList(38,36,208,187,false,Tab_Armas) guiGridListSetSelectionMode(lista,2) armas = guiGridListAddColumn(lista,"Armas",0.6) guiGridListAddColumn(lista,"Municion",0.5) equipar = guiCreateButton(36,229,65,25,"Equipar",false,Tab_Armas) Tirar = guiCreateButton(149,230,65,25,"Tirar",false,Tab_Armas) Tab_Medicinas = guiCreateTab("Medicinas",GUIEditor_TabPanel[1]) Grid_Medicina = guiCreateGridList(34,21,218,185,false,Tab_Medicinas) guiGridListSetSelectionMode(Grid_Medicina,2) guiGridListAddColumn(Grid_Medicina,"Medicinas",0.2) Usar = guiCreateButton(33,222,74,26,"Usar",false,Tab_Medicinas) tirar_medicina = guiCreateButton(139,222,74,26,"Tirar",false,Tab_Medicinas) guiSetVisible(GUIEditor_TabPanel[1], false) function ver() guiSetVisible(GUIEditor_TabPanel[1], true) showCursor(true) end addCommandHandler("prueva",ver) function lol() guiSetVisible(GUIEditor_TabPanel[1], false) showcursor(false) end addCommandHandler("prueva2",lol) function armas ( ) for slot = 0, 12 do local weapon = getPedWeapon ( localPlayer, slot ) if ( weapon > 0 ) then local row = guiGridListAddRow ( lista ) guiGridListSetItemText ( lista, row, armas, getWeaponNameFromID ( weapon ), false, false ) end end end
-
Me parece que hize cualquier cosa function armas() local weapons = getPedWeapon(source) for _,weapons in ipairs(weapons) local row = guiGridListAddRow ( lista ) guiGridListSetItemText ( lista, row, armas, weapons, false, false ) end end o capas que function armas() for _,weapons in ipairs(getPedWeapon(source)) local row = guiGridListAddRow ( lista ) guiGridListSetItemText ( lista, row, armas, weapons, false, false ) end end
-
Hola tengo una duda como se puede obtener todas las armas que tiene un jugador y ponerlas en una gridlist?
-
OFFT: 1 por que los demas se borraron en mi pantalla aparecieron como 5 o 6
-
Listo ya lo arregle me ayudo AlexSteel
-
Hace un solo topic no 5 o 6
-
No creo que el error sea del meta pero bue
-
Spawnea y todo pero me da bad argument en getElementModel