Jump to content

NodZen

Members
  • Posts

    754
  • Joined

  • Last visited

Everything posted by NodZen

  1. Hi! friends , look the problem is that no image in the scoreboard... exports.scoreboard:addScoreboardColumn('Rank') function ranks() local account = getPlayerAccount(source) local zombiekills = getAccountData(account,"play.kill") or 0 if (zombiekills <= 500) then setAccountData(account, "Rango", "1") setElementData(source , " Rank", "1.png") elseif (zombiekills >= 300000) then setAccountData(account, "Rango", "2") setElementData(source, "Rank", "2.png") end end and the scoreboard client elseif column.name == "rangos" then dxDrawImage( topX+theX, y+s(1), 30, 30, content, 0, 0, 0, cWhite, drawOverGUI ) some solution? Thanks
  2. Algo que podrias usar es xmlSaveFile Pero que cosas quieres guardar?
  3. NodZen

    IMG

    Estas seguro que esa es la direccion?... Tenes que probar asi exports[ "admin" ]:getPlayerCountry ( source ) es getPlayerCountry
  4. Si esos videos ayudan. Pero Narutimmy , te costarà mucho si no sabes de lua ( te lo digo porque a mi me costò y me sigue costando un poco pero voy bien)....
  5. Aun no lo puedo resolver. Alguna ayuda?
  6. Algo mas o menos asi? elseif column.name == "TLS_RANKS" then dxDrawImage( topX+theX, y+s(1), 30, 30, content, 0, 0, 0, cWhite, drawOverGUI )
  7. Como o en que parte?
  8. Hola amigos , saben como puedo resolver esto? exports.scoreboard:addScoreboardColumn('Rank') addEventHandler("onPlayerSpawn",root, function() local account = getPlayerAccount(source) local zombiekills = getAccountData(account,"Zombie kills") if (zombiekills >= 0) and (zombiekills <= 4) then setAccountData ( account, "Rank", "1" ) setElementData(source, "Rank", "1.png") elseif (zombiekills >= 5) and (zombiekills <= 9) then setAccountData ( account, "Rank", "2.png" ) end end ) No crea las imagenes ayuda
  9. TEMA CERRADO , YA LO SOLUCIONÈ
  10. Amigos , encontre en la comunidad un script para comprar armas. Bueno el tema es que el script tiene una "licencia" osea , tenes que comprar en el juego la licencia que sale $55.000. Pero a la hora de intentar sacar eso el script deja de funcionar client function CreateShopWindow() ShopWindow = guiCreateWindow(350,250,450,320,"Ammunation",false) guiCreateLabel(35,35,250,60,"To buy weapons u need a license:$55.000",false,ShopWindow) btn_buy_license = guiCreateButton(270,33,135,20,"License for Weapons",false,ShopWindow) -- Below, not original price. It's just strings to the buttons. If you must change the weapon price, go to server-side script. -- Abaixo, as variáveis não são o preço real das armas. É apenas as strings para serem escritas nos botões. Se quer mudar o preço, mude no arquivo server-side. local price_porrete = "2.500" local price_m4 = "2.500" local price_ak = "2.500" local price_tec9 = "2.500" local price_mp5 = "2.500" local price_knife = "2.500" local price_uzi = "2.500" local price_sniper = "2.500" local price_shotgun = "2.500" local price_spaz12 = "2.500" local price_pistol = "2.500" local price_teargas = "2.500" local price_rifle = "2.500" local price_satchel = "2.500" local price_grenade = "2.500" btn_buy_porrete = guiCreateButton(29,140,60,15,price_porrete,false,ShopWindow) btn_buy_m4 = guiCreateButton(109,140,60,15,price_m4,false,ShopWindow) btn_buy_ak = guiCreateButton(189,140,60,15,price_ak,false,ShopWindow) btn_buy_tec9 = guiCreateButton(269,140,60,15,price_tec9,false,ShopWindow) btn_buy_mp5 = guiCreateButton(349,140,60,15,price_mp5,false,ShopWindow) btn_buy_knife = guiCreateButton(29,220,60,15,price_knife,false,ShopWindow) btn_buy_uzi = guiCreateButton(109,220,60,15,price_uzi,false,ShopWindow) btn_buy_sniper = guiCreateButton(189,220,60,15,price_sniper,false,ShopWindow) btn_buy_shotgun = guiCreateButton(269,220,60,15,price_shotgun,false,ShopWindow) btn_buy_spaz12 = guiCreateButton(349,220,60,15,price_spaz12,false,ShopWindow) btn_buy_pistol = guiCreateButton(29,295,60,15,price_pistol,false,ShopWindow) btn_buy_teargas = guiCreateButton(109,295,60,15,price_teargas,false,ShopWindow) btn_buy_rifle = guiCreateButton(189,295,60,15,price_rifle,false,ShopWindow) btn_buy_satchel = guiCreateButton(269,295,60,15,price_satchel,false,ShopWindow) btn_buy_grenade = guiCreateButton(349,295,60,15,price_grenade,false,ShopWindow) addEventHandler("onClientGUIClick", btn_buy_porrete, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_m4, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_ak, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_tec9, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_mp5, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_knife, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_uzi, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_sniper, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_shotgun, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_spaz12, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_pistol, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_teargas, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_rifle, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_satchel, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_grenade, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_license, BuyLicense) guiCreateMemo(25,60,405,15," ",false,ShopWindow) guiCreateStaticImage(30,80,60,60,"imagens/3.png", false,ShopWindow ) guiCreateStaticImage(110,80,60,60,"imagens/31.png", false,ShopWindow ) guiCreateStaticImage(190,80,60,60,"imagens/30.png", false,ShopWindow ) guiCreateStaticImage(270,80,60,60,"imagens/32.png", false,ShopWindow ) guiCreateStaticImage(350,80,60,60,"imagens/33.png", false,ShopWindow ) guiCreateStaticImage(30,160,60,60,"imagens/1.png", false,ShopWindow ) guiCreateStaticImage(110,160,60,60,"imagens/20.png", false,ShopWindow ) guiCreateStaticImage(270,160,60,60,"imagens/27.png", false,ShopWindow ) guiCreateStaticImage(350,160,60,60,"imagens/28.png", false,ShopWindow ) guiCreateStaticImage(190,160,60,60,"imagens/29.png", false,ShopWindow ) guiCreateStaticImage(30,240,60,60,"imagens/2.png", false,ShopWindow ) guiCreateStaticImage(110,240,60,60,"imagens/26.png", false,ShopWindow ) guiCreateStaticImage(190,240,60,60,"imagens/25.png", false,ShopWindow ) guiCreateStaticImage(270,240,60,60,"imagens/4.png", false,ShopWindow ) guiCreateStaticImage(350,240,60,60,"imagens/5.png", false,ShopWindow ) guiWindowSetSizable(ShopWindow,false) guiSetVisible(ShopWindow,false) end addEventHandler("onClientResourceStart", getRootElement(), CreateShopWindow) function BuyWeapon(button, state) if (button == "left") then if(source == btn_buy_porrete) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_porrete") elseif(source == btn_buy_m4) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4") elseif(source == btn_buy_ak) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak") elseif(source == btn_buy_tec9) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9") elseif(source == btn_buy_mp5) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5") elseif(source == btn_buy_knife) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife") elseif(source == btn_buy_uzi) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi") elseif(source == btn_buy_sniper) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper") elseif(source == btn_buy_shotgun) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun") elseif(source == btn_buy_spaz12) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12") elseif(source == btn_buy_pistol) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pistol") elseif(source == btn_buy_teargas) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_teargas") elseif(source == btn_buy_rifle) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle") elseif(source == btn_buy_satchel) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel") elseif(source == btn_buy_grenade) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade") end end end function BuyLicense(button) if(button == "left" and source == btn_buy_license) then triggerServerEvent("onClientBuyLicense", localPlayer) end end function ShowGUI ( ) guiSetVisible ( ShopWindow, not guiGetVisible ( ShopWindow ) ) showCursor ( not isCursorShowing( ) ) end bindKey ( "F7","down", ShowGUI ) server function BuyWeaponOnServer(weapon_name) player_money = getPlayerMoney(source) player_account = getPlayerAccount(source) local price_porrete = "2500" local price_m4 = "2500" local price_ak = "2500" local price_tec9 = "2500" local price_mp5 = "2500" local price_knife = "2500" local price_uzi = "2500" local price_sniper = "2500" local price_shotgun = "2500" local price_spaz12 = "2500" local price_pistol = "2500" local price_teargas = "2500" local price_rifle = "2500" local price_satchel = "2500" local price_grenade = "2500" if(getAccountData(player_account, "GunLicense") == true) then if(weapon_name == "weapon_porrete") then if(player_money >= tonumber(price_porrete)) then giveWeapon(source, 3) takePlayerMoney(source, tonumber(price_porrete)) outputChatBox("You bought a Nightstick.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a Nightstick.", source, 255, 0, 0) end elseif(weapon_name == "weapon_m4") then if(player_money >= tonumber(price_m4)) then giveWeapon(source, 31, 100) takePlayerMoney(source, tonumber(price_m4)) outputChatBox("You bought an M4.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy an M4.", source, 255, 0, 0) end elseif(weapon_name == "weapon_ak") then if(player_money >= tonumber(price_ak)) then giveWeapon(source, 30, 100) takePlayerMoney(source, tonumber(price_ak)) outputChatBox("You bought an AK-47.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy an AK-47.", source, 255, 0, 0) end elseif(weapon_name == "weapon_tec9") then if(player_money >= tonumber(price_tec9)) then giveWeapon(source, 32, 100) takePlayerMoney(source, tonumber(price_tec9)) outputChatBox("You bought a TEC-9.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a TEC-9.", source, 255, 0, 0) end elseif(weapon_name == "weapon_mp5") then if(player_money >= tonumber(price_mp5)) then giveWeapon(source, 29, 100) takePlayerMoney(source, tonumber(price_mp5)) outputChatBox("You bought an MP5.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy an MP5.", source, 255, 0, 0) end elseif(weapon_name == "weapon_knife") then if(player_money >= tonumber(price_knife)) then giveWeapon(source, 4) takePlayerMoney(source, tonumber(price_knife)) outputChatBox("You bought a knife.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a knife.", source, 255, 0, 0) end elseif(weapon_name == "weapon_uzi") then if(player_money >= tonumber(price_uzi)) then giveWeapon(source, 28, 100) takePlayerMoney(source, tonumber(price_uzi)) outputChatBox("You bought an UZI.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy an UZI.", source, 255, 0, 0) end elseif(weapon_name == "weapon_sniper") then if(player_money >= tonumber(price_sniper)) then giveWeapon(source, 34, 100) takePlayerMoney(source, tonumber(price_sniper)) outputChatBox("You bought a Sniper.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a Sniper.", source, 255, 0, 0) end elseif(weapon_name == "weapon_shotgun") then if(player_money >= tonumber(price_shotgun)) then giveWeapon(source, 25, 100) takePlayerMoney(source, tonumber(price_shotgun)) outputChatBox("You bought a Shotgun.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a Shotgun.", source, 255, 0, 0) end elseif(weapon_name == "weapon_spaz12") then if(player_money >= tonumber(price_spaz12)) then giveWeapon(source, 27, 100) takePlayerMoney(source, tonumber(price_spaz12)) outputChatBox("You bought a SPAZ-12.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a SPAZ-12.", source, 255, 0, 0) end elseif(weapon_name == "weapon_pistol") then if(player_money >= tonumber(price_pistol)) then giveWeapon(source, 22, 100) takePlayerMoney(source, tonumber(price_pistol)) outputChatBox("You bought a Pistol.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a Pistol.", source, 255, 0, 0) end elseif(weapon_name == "weapon_teargas") then if(player_money >= tonumber(price_teargas)) then giveWeapon(source, 17, 1) takePlayerMoney(source, tonumber(price_teargas)) outputChatBox("You bought a teargas", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a teargas.", source, 255, 0, 0) end elseif(weapon_name == "weapon_rifle") then if(player_money >= tonumber(price_rifle)) then giveWeapon(source, 33, 100) takePlayerMoney(source, tonumber(price_rifle)) outputChatBox("You bought a Rifle.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a Rifle.", source, 255, 0, 0) end elseif(weapon_name == "weapon_satchel") then if(player_money >= tonumber(price_satchel)) then giveWeapon(source, 39, 1) takePlayerMoney(source, tonumber(price_satchel)) outputChatBox("You bought a Satchel Charges.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a Satchel Charges.", source, 255, 0, 0) end elseif(weapon_name == "weapon_grenade") then if(player_money >= tonumber(price_grenade)) then giveWeapon(source, 16, 1) takePlayerMoney(source, tonumber(price_grenade)) outputChatBox("You bought a grenade.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a grenade.", source, 255, 0, 0) end end else outputChatBox("You dont have a license to bear arms.", source, 255, 0, 0) end end addEvent("onClientBuyWeapon", true) addEventHandler("onClientBuyWeapon", getRootElement(), BuyWeaponOnServer) function BuyWeaponLicense() player_money = getPlayerMoney(source) player_account = getPlayerAccount(source) local license_price = "55000" if(getAccountData(player_account, "GunLicense") == false) then if(player_money >= tonumber(license_price)) then setAccountData(player_account, "GunLicense", true) takePlayerMoney(source, tonumber(license_price)) outputChatBox("You now have a license to bear arms.", source, 0, 255, 0) else outputChatBox("You do not have enough money to buy a license to bear arms.", source, 255, 0, 0) end else outputChatBox("You already have a license to bear arms.", source, 255, 0, 0) end end addEvent("onClientBuyLicense", true) addEventHandler("onClientBuyLicense", getRootElement(), BuyWeaponLicense) que lineas debo borrar?
  11. [2012-10-01 00:29:43] WARNING: TLS_zombies\boss_zombies.lua:22: Bad argument @ 'createBlipAttachedTo' [2012-10-01 00:29:43] ERROR: exports: Call to non-running server resource (slothBot) [string "?"] Salen cientos de esos y me consumen todo el cpu
  12. No Yakuza no funciona , y en el mtaserver.exe salen millones de errores Agluna ayuda?
  13. Lo pruevo y te digo si funciona
  14. function showImage () foto = guiCreateStaticImage ( las ubicacioens , la imagen.png) setTimer ( destroyElement, 15000, 1, foto ) end addEventHandler("onResourceStart", showImage) Tu lo editas a tu gusto
  15. Bueno miren. El tema es asi. Tengo echo un script con cantidad de jefes zombies "bosses" hasta hay todo bien.Pero lo que quiero es que llegue determinada hora en el server y entonces se creen todos los zombies. Miren functiob boss () if ( not isElement ( slothBot ) ) then local hours = getTime() if ( hours >= 23 ) then --aca se crea el boss todo bien ,entonces local hours = getTime() if ( hours >= 03 ) then setTimer ( destroyElement, boss, 300, 0 ) --y se destruye bien, eso pasa con todos. PERO EL PROBLEMA ES QUE CUANDO LLEGA LAS 23 EL BOT NO SE CREA , AMENOS QUE REINICIE EL SLOTHBOT , LO MISMO AL DESTRUIRLO TENGO QUE REINICIAR EL RESOURCE Y ASI SUCESIVAMENTE... ENTONCES HICE function inicio () local hours = getTime() if ( hours >= 23 ) then startResource( getResourceFromName( 'slothbot' ) ) end end addEventHandler("onResourceStart", inicio) -----top--- function alto () if ( hours >= 03 ) then restartResource( getResourceFromName( 'slothbot' ) ) end end addEventHandler("onResourceStart", alto) PERO SIGUE IGUAL, TENGO QUE ANDAR REINICIANDO EL RESOURCE. Y NECESITO QUE ESO SEA AUTOMATICO .. AYUDENME GENTE GRACIAS
  16. ok , pero como le hago para que el resource "slothBot" se reinicie a las 23? Se que hay que usar restartResource pero como le pongo para que sea el slothBot?
  17. Amigos , intente hacer para que cuando sean las 23:00 hora en el jeugo! , se cree un slothBot. miren if ( not isElement ( slothBot ) ) then if ( getTime ( source ) >= 23 ) then--aca se spawnee el sloth. Tambien asi if ( getTime >= 23 ) then Pero no funca. Ayuda?
  18. Te falta el Bindeo de las teclas
  19. NodZen

    Duda

    Pues si ty quieres que no se creen los teams en el scoreboard usando el spawn de 50p , Lo veo dificil .
  20. NodZen

    Duda

    Sacar la funcion? No entiendo , especifica mas
  21. Hola , si se puede. Tendrias que usar getMapName--y dxDrawText
  22. NodZen

    INFECCION DUDA

    Tambien probe con setPedSkin , pero igual no funca.
  23. NodZen

    INFECCION DUDA

    Si lo use asi , porque me guiaba de un script. Y como Alex me dijo que me obtenga quien lo ataco puse eso. Pero igual no funciona Me dice "bad argument @ - addEventHandler expected function at argument 3 , got nil
  24. NodZen

    INFECCION DUDA

    Si si lo hice Yo guiandome con uno que esta en la comunidad. Pero porque usaste 'source'?
  25. NodZen

    INFECCION DUDA

    Mira Yakuza , hasta ahora voy asi... teamzombie = createTeam ( "Zombie", 255, 0 , 0 )-- Crear Team-- function rewardOnWasted ( attacker, attackerweapon, bodypart, loss ) if (attackerweapon == 0) and getElementData(attacker,"zombie") then if not getElementData (source,"zombie") then getPlayerMoney ( attacker, 100 ) setElementData ( source, "zombie", true ) setPlayerTeam ( source, teamzombie ) setTimer(setElementModel,300000,1,player,25) end end end addEventHandler ( "rewarOnWasted", getRootElement(), rewarOnWasted ) Pero lo demas nose
×
×
  • Create New...