
Plate
Members-
Posts
938 -
Joined
-
Last visited
Everything posted by Plate
-
addEventHandler("onResourceStart",resourceRoot, function () setWeaponProperty(22, "pro", "damage", 20) end) eso va en server side
-
creo que era 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 ) local id = getElementModel ( slothbot1 ) if id == 300 then exports.extra_health:setElementExtraHealth(solthbot1, 400) outputChatBox("[bOSS]:Boss high spawned", getRootElement(), 155, 155, 155, false) elseif id == 301 then exports.extra_health:setElementExtraHealth(slothbot1, 7500) outputChatBox("[bOSS]:Boss medium spawned", getRootElement(), 155, 155, 155, false) elseif id == 302 then exports.extra_health:setElementExtraHealth(slothbot1, 5000) outputChatBox("[bOSS]:Boss low spawned", getRootElement(), 155, 155, 155, false) end end end end end addEventHandler ( "onZombieWasted", getRootElement(), zona ) addEventHandler("onBotSpawn",getRootElement(),zona) fijate los models y cambialos a tu gusto
-
Depende narutimmy si lo queres hacer por skin o por otra cosa
-
Yo no encontraba este topic jaja
-
Gracias solid PD: Tengo un problema con este script que creo alex pero yo lo modifique para que guarde solamente los teams que se crean con el panel que cree pero no me da ningun error y tampoco guarda los teams addEventHandler( "onResourceStart", resourceRoot, function () for k, i in ipairs (xmlNodeGetChildren( xmlLoadFile( "Clan.xml" ) )) do local r,g,b = unpack( fromJSON( xmlNodeGetAttribute(i, "color") )) createTeam( xmlNodeGetAttribute(i, "name"),tonumber(r), tonumber(g), tonumber(b)) end end ) function clansave () local xml = fileCreate ( "Clan.xml" ) fileWrite( xml, "\n" ) for k, i in ipairs(getElementsByType( "team" )) do local r, g, b = getTeamColor ( i ) local colors = {r, g, b} fileWrite( xml, "\""..getTeamName( i ).."\" color=\""..toJSON(colors).."\"/> \n") end fileWrite( xml, " \n" ) fileClose(xml) end addEvent("onClanCreate", true) addEventHandler("onClanCreate", resourceRoot, clansave)
-
Hola tengo un problema con este script es que me da bad argument xmlNodeSetAttribute en el segundo node el script: function HL(player, teamName ) local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then setPlayerTeam ( player , theTeam ) local xml = xmlCreateFile("Lideres.xml","Lideres") local name = xmlCreateChild(xml, "Lideres") xmlNodeSetAttribute(name,"Lider", getPlayerName(player)) xmlNodeSetAttribute(name,"Team", getPlayerTeam(player)) xmlSaveFile(xml) xmlUnloadFile(xml) end end addEvent("onClanLiderAdd", true) addEventHandler("onClanLiderAdd", getRootElement(), HL)
-
Asi? function HL(player, teamName) local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then setPlayerTeam ( player , theTeam ) local xml = fileCreate ( "Lideres.xml" ) xmlNodeSetAttribute( xml, "\""..getPlayerName(player).."\" team=\""..getTeamName(getPlayerTeam(player)).."\"/> \n") fileWrite( xml, " \n" ) fileClose(xml) end end addEvent("HL", true) addEventHandler("HL", getRootElement(), HL)
-
Hola necesito que me digan como puedo 1 verificar desde este xml "[COD]Plate" team="Clan de prueba"/> el team del lider y que se abra el panel para ese team tambien como poner los players en ese team en una gridlist y como desde un edit poner el nombre de un player y agregarlo
-
Probe modificando mi codigo y sirvio pero ahora tengo un problema por que asi no me anda function HL(player, teamName) local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then setPlayerTeam ( player , theTeam ) local xml = fileCreate ( "Lideres.xml" ) fileWrite( xml, "\""..getPlayerName(player).."\" team=\""..getTeamName(getPlayerTeam(player)).."\"/> \n") fileWrite( xml, " \n" ) outputChatBox(getPlayerName(source) .." hizo lider y agrego a ".. getPlayerName(player).." a ".. getPlayerTeam(player).."", getRootElement(), 220, 255, 200) fileClose(xml) end end addEvent("HL", true) addEventHandler("HL", getRootElement(), HL)
-
Si le saco el getTeamName aparece el nombre del player pero ahora que me di cuenta en team tendria que ir el team del que el jugador es lider y no tengo ni idea de como obtenerlo
-
ahor me dice unfinished string name expected near >
-
attempt to concatenate a boolean value
-
necesito ayuda me da bad file pointer @fileWrite y fileClose(1) y tambien attempt to concatenate a user data valvue server function HL(player) local xml = fileCreate ( "Lideres.xml" ) fileWrite( xml, "\n" ) fileWrite( xml, "\""..getPlayerName(player).."\" team=\""..getPlayerTeam(player).."\"/> \n") end fileWrite( xml, " \n" ) fileClose(xml) addEvent("HL", true) addEventHandler("HL", getRootElement(), HL) client function HLP() local row, col = guiGridListGetSelectedItem ( teamList ) if ( row and col and row ~= -1 and col ~= -1 ) then local team = guiGridListGetItemText ( teamList, row, columnA ) triggerServerEvent("HL", localPlayer, localPlayer, team) end end addEventHandler ( "onClientGUIClick", HL, HLP, false )
-
Hya te lo mando por pm
-
Pero no me anda igual
-
No es necesario
-
guiGridListClear ( teamList ) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamList ) guiGridListSetItemText ( teamList, row, columnA, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamList, row, columnA, getTeamColor ( team ) ) end
-
PD lo de la guiGridListClear no me funciono lo puse antes de lo de los teams y sigue sin andar
-
Listo muchas gracias!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! solid y alex!!!!!!!!!!!!!!!!!
-
Gracias alex y solid pero hay una cosa es que cuando borro el team todabia queda en la gridlist
-
Me da bad argument en getTeamFromName server function borro() local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then destroyElement(theTeam) end end addEvent("borro", true) addEventHandler("borro", getRootElement(), borro) client function borr ( ) local row, col = guiGridListGetSelectedItem ( teamList ) if ( row and col and row ~= -1 and col ~= -1 ) then local team = guiGridListGetItemText ( teamList, row, columnA ) triggerServerEvent ( "borro", localPlayer, localPlayer, team ) end end addEventHandler ( "onClientGUIClick", borrar, borr, false )
-
Y para borrar un team es lo mismo solid? pero con un destroyElement en lugar del setPlayerTeam?