Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Help

    It works here, when I hit the marker, the window is shown with the vehicle.
  2. Castillo

    Ayuda :D

    Si, eso esta bien Renkon.
  3. Vos creaste el team despues de crear el bot. function Destroyer ( ) local SWAT = createTeam ( "SWAT", 255, 0, 0 ) slothbot = exports [ "slothbot" ]:spawnBot ( 325.60107421875, 1917.4279785156, 26.560228347778, 90, 285, 0, 0, SWAT, 31, hunting, true ) exports.extrahealth:setElementExtraHealth ( slothbot, 10000 ) outputChatBox ( "Jefe Umbrella:Emviando SWATS" ) outputChatBox ( "SWAt1:confirmado señor" ) outputChatBox ( "Jefe Umbrella:SWAT 1 quiero a toda su tropa lista los recojera un 2 helicopteros en el area 69" ) outputChatBox ( "Swat1:entendido" ) outputChatBox ( "Jefe Umbrella:su mision es anikillar al projecto nemesis" ) end addEventHandler ( "onResourceStart",resourceRoot, Destroyer )
  4. Castillo

    Ayuda :D

    Te faltan las comillas, como a ElMota.
  5. Castillo

    Ayuda :D

    No podes borrar comandos originales del MTA, podes cancelarlo(s) cuando lo(s) usan, para eso tenes que usar el evento: onPlayerCommand.
  6. Castillo

    Help

    No, that's wrong. carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) guiWindowSetSizable( carrosWindow,false) guiSetVisible( carrosWindow, false ) carrosVis = { 440, 320 } for index, model in ipairs ( carrosVis ) do local row = guiGridListAddRow ( carrosList ) guiGridListSetItemText ( carrosList, row, column, tostring ( getVehicleNameFromModel ( model ) ), false, true ) end carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( hitElement == localPlayer ) then if ( source == carrosMarker ) then guiSetVisible ( carrosWindow, true ) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == carrosClose ) then guiSetVisible ( carrosWindow, false ) end end )
  7. Will ( One of SAUR Founders ) got kicked for being inmature and childish. SAUR is now owned by me and (SAUR)Dwayne, we're not rookies, and we're not going to shut down, we're working hard on the new version ( SAUR 3.0 ).
  8. Castillo

    Ayuda :D

    @ElMota: La funcion "cancelar" no tiene ningun sentido, nunca va a funcionar eso.
  9. El recurso slothbot no soporta los vehiculos.
  10. https://community.multitheftauto.com/index.php?p= ... ls&id=4605 Original: https://community.multitheftauto.com/index.php?p= ... ls&id=1627
  11. If you see Kenix's post, you can see that he edited the post one time.
  12. -- Weapon tables for ammo. resourceroot = getResourceRootElement(getThisResource()) local noreloadweapons = {} --Weapons that doesn't reload (including the flamethrower, minigun, which doesn't have reload anim). noreloadweapons[16] = true noreloadweapons[17] = true noreloadweapons[18] = true noreloadweapons[19] = true noreloadweapons[25] = true noreloadweapons[33] = true noreloadweapons[34] = true noreloadweapons[35] = true noreloadweapons[36] = true noreloadweapons[37] = true noreloadweapons[38] = true noreloadweapons[39] = true noreloadweapons[41] = true noreloadweapons[42] = true noreloadweapons[43] = true local meleespecialweapons = {} --Weapons that don't shoot, and special weapons. meleespecialweapons[0] = true meleespecialweapons[1] = true meleespecialweapons[2] = true meleespecialweapons[3] = true meleespecialweapons[4] = true meleespecialweapons[5] = true meleespecialweapons[6] = true meleespecialweapons[7] = true meleespecialweapons[8] = true meleespecialweapons[9] = true meleespecialweapons[10] = true meleespecialweapons[11] = true meleespecialweapons[12] = true meleespecialweapons[13] = true meleespecialweapons[14] = true meleespecialweapons[15] = true meleespecialweapons[40] = true meleespecialweapons[44] = true meleespecialweapons[45] = true meleespecialweapons[46] = true function DXdraw() --Variables sWidth, sHeight = guiGetScreenSize() -- Getting the screen size health = getElementHealth( getLocalPlayer() ) lineLength1 = 114 * ( health / 100 ) -- Health bar armor = getPedArmor( getLocalPlayer() ) lineLength2 = 114 * ( armor / 100 ) -- Armor bar ammoinclip = getPedAmmoInClip (getLocalPlayer()) -- The ammo inside the clip totalammo = getPedTotalAmmo(getLocalPlayer())-getPedAmmoInClip(getLocalPlayer()) -- The total ammo minus ammo inside clip totalammo2 = getPedTotalAmmo(getLocalPlayer()) showammo1 = ammoinclip showammo2 = totalammo showammo3 = totalammo2 moneycount=getPlayerMoney(getLocalPlayer()) money= '$' ..moneycount -- Money text = "Hola" local wantedlevel = getPlayerWantedLevel (getLocalPlayer()) --Getting the player's wanted level. -------- Dynamic health colour thanks to 50p ---------- tick = getTickCount () -- For active health bar local maxHealth = 100; -- get max health stat local colourPercent = ( health / maxHealth ) * 200; local red, green; -- we don't need blue because we don't use it, it'll be 0 if health < ( maxHealth / 2 ) then red = 200; green = ( health / 50 ) * ( colourPercent * 2 ); else green = 200; red = 200 - ( ( health - 50 ) / 50 ) * 200; end -- For inactive health bar local maxHealth = 75; -- get max health stat local colourPercent1 = ( health / maxHealth ) * 75; local red1, green1; -- we don't need blue because we don't use it, it'll be 0 if health < ( maxHealth / 2 ) then red1 = 75; green1 = ( health / 50 ) * ( colourPercent1 * 2 ); else green1 = 75; red1 = 75 - ( ( health - 50 ) / 50 ) * 75; end local color1 = tocolor( red1, green1, 0, 150 ) local color2 = tocolor( red, green, 0, 200 ) -- For the health bar if getTickCount () %1500 < 500 and health <= 20 and armor <=0 then -- If health is less than 20%, armor is 0%, the health bar will blink by hiding the health bar every 1.5 seconds. else dxDrawRectangle(sWidth-206,sHeight-29,114.0,14.0,color1, false) -- Health inactive bar dxDrawRectangle(sWidth-206,sHeight-29,lineLength1,14.0,color2,false) --Health active bar end if armor <= 0 then else dxDrawRectangle(sWidth-206,sHeight-43,lineLength2,14.0,tocolor(200,200,200,200),false) -- Armor active bar dxDrawRectangle(sWidth-206,sHeight-43,114.0,14.0,tocolor(50,50,50,150),false) -- Armor inactive bar end ------ DX drawing that are visible at all times dxDrawRectangle(sWidth-84,sHeight-48,78.0,33.0,tocolor(0,0,0,150),false) dxDrawText(tostring (money),sWidth-200,sHeight-78,sWidth-5,sHeight-54,tocolor(0,0,0,200),1.0,"pricedown","right","top",false,false,false) -- Money DX text (shadow) dxDrawText(tostring (money),sWidth-202,sHeight-81,sWidth-7,sHeight-57,tocolor(0,100,0,220),1.0,"pricedown","right","top",false,false,false) -- Money DX text dxDrawText(tostring (text),sWidth-81,sHeight-46,sWidth-10,sHeight-16,tocolor(250,250,250,200),1.0,"diploma","center","top",false,false,false) ------- Weapon icons & Ammo DX drawings local weaponID = getPedWeapon (getLocalPlayer()); -- Get weapon ID dxDrawImage(sWidth-266,sHeight-60,48.0,52.0,"icons/".. tostring( weaponID ) .. ".png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Weapon icons image. Check the icons file if you want to take and replace weapon icons. -- now decide if the optional stuff should be drawn if noreloadweapons [getPedWeapon(getLocalPlayer())] then dxDrawText(tostring (showammo3),sWidth-400,sHeight-47,sWidth-288,sHeight-12,tocolor(0,255,255,200),1.0,"bankgothic","right","top",false,false,false) -- No reload weapons (for shotgun, grenades, etc) elseif meleespecialweapons [getPedWeapon(getLocalPlayer())] then -- Draw Nothing for melee and special weapons. else --Weapons that reloads. dxDrawText(tostring (showammo2),sWidth-414,sHeight-47,sWidth-369,sHeight-18,tocolor(0,255,255,200),1.0,"bankgothic","right","top",false,false,false) dxDrawText("|",sWidth-361,sHeight-48,sWidth-385,sHeight-8,tocolor(255,200,0,200),1.0,"bankgothic","left","top",false,false,false) dxDrawText(tostring (showammo1),sWidth-345,sHeight-47,sWidth-272,sHeight-12,tocolor(0,255,255,200),1.0,"bankgothic","left","top",false,false,false) end if wantedlevel == 0 then -- Draw nothing (Wanted level 0) elseif wantedlevel == 1 then dxDrawImage(sWidth-21,sHeight-212,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-190,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-168,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-148,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-126,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-105,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) -- Wanted level 1 elseif wantedlevel == 2 then dxDrawImage(sWidth-21,sHeight-212,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-190,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-168,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-148,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-126,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) -- Wanted level 2 dxDrawImage(sWidth-21,sHeight-105,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) elseif wantedlevel == 3 then dxDrawImage(sWidth-21,sHeight-212,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-190,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-168,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-148,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) -- Wanted level 3 dxDrawImage(sWidth-21,sHeight-126,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-105,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) elseif wantedlevel == 4 then dxDrawImage(sWidth-21,sHeight-212,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-190,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-168,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) -- Wanted level 4 dxDrawImage(sWidth-21,sHeight-148,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-126,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-105,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) elseif wantedlevel == 5 then dxDrawImage(sWidth-21,sHeight-212,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(sWidth-21,sHeight-190,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) -- Wanted level 5 dxDrawImage(sWidth-21,sHeight-168,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-148,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-126,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-105,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) else dxDrawImage(sWidth-21,sHeight-212,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) -- Wanted level 6 dxDrawImage(sWidth-21,sHeight-190,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-168,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-148,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-126,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) dxDrawImage(sWidth-21,sHeight-105,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end end -- End of the DX Drawing function -------- HUD toogle command functions. function hudChanger () addEventHandler("onClientRender", getRootElement(), DXdraw) showPlayerHudComponent ( "armour", false ) showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "money", false ) showPlayerHudComponent ( "clock", false ) showPlayerHudComponent ( "weapon", false ) showPlayerHudComponent ("ammo", false) showPlayerHudComponent ( "money", false ) showPlayerHudComponent ( "wanted", false ) end addCommandHandler ( "showhud", hudChanger ) -- Shows the Alternate HUD addCommandHandler ( "hidegtahud", hudChanger ) -- Hides the GTA HUD addEventHandler( "onClientResourceStart", resourceroot, hudChanger ) addEventHandler( "onPlayerJoin", resourceroot, hudChanger ) -- The same, but also on player join. function hudChanger2 () removeEventHandler("onClientRender", getRootElement(), DXdraw) showPlayerHudComponent ( "armour", true ) showPlayerHudComponent ( "health", true ) showPlayerHudComponent ( "money", true ) showPlayerHudComponent ( "clock", true ) showPlayerHudComponent ( "weapon", true ) showPlayerHudComponent ("ammo", true ) showPlayerHudComponent ( "money", true ) showPlayerHudComponent ( "wanted", true ) end addCommandHandler ( "hidehud", hudChanger2) -- Removes the HUD, and shows the GTA HUD. addCommandHandler ( "showgtahud", hudChanger2) addEventHandler("onClientResourceStop", resourceroot, hudChanger2) -- When you stop the resource, executes. function hudChanger3 () removeEventHandler("onClientRender", getRootElement(), DXdraw) showPlayerHudComponent ("all", false) end addCommandHandler ( "hideall", hudChanger3 ) -- Shows the Alternate HUD function radarcommand1 () showPlayerHudComponent ("radar", true) end addCommandHandler( "showradar", radarcommand1 ) function radarcommand2 () showPlayerHudComponent ("radar", false) end addCommandHandler( "hideradar", radarcommand2 ) Cambia la variable "text" a lo que vos quieras.
  13. Ese script deberia funcionar para el chat, pero para la scoreboard ya es otra cosa, porque las funciones de cuenta son solo server side.
  14. El script es server side, cambiale type="client" a type="server" en el meta.xml.
  15. onPlayerChat -- El evento para cuando alguien chatea. getPlayerAccount -- Para obtener la cuenta. getAccountName -- Para obtener el nombre de la cuenta. cancelEvent -- Para cancelar el texto original
  16. Usa: getElementData client side.
  17. Castillo

    Help

    1: What is "guIGrifListAddRow" ? 2: Why you're using getPlayerName if your script is about vehicles?
  18. Si, pero estabas usando la rotacion X, no la rotacion Z que es lo que retorna getPedRotation.
  19. Castillo

    Help

    guiGridListAddRow -- To add the row. guiGridListSetItemText -- To set a row text.
  20. Castillo

    Zombie

    It may be a custom game mode, that means they scripted it for their server.
  21. Castillo

    Help

    carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) guiWindowSetSizable( carrosWindow,false) guiSetVisible( carrosWindow, false ) carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( hitElement == localPlayer ) then if ( source == carrosMarker ) then guiSetVisible ( carrosWindow, true ) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == carrosClose ) then -- If the button clicked is "carrosClose" guiSetVisible ( carrosWindow, false ) -- Hide the window. end end )
  22. Castillo

    fire

    You're welcome.
  23. Castillo

    fire

    That's not required, if you add it, then it won't work. @freakk: You've set that script as client side, right? the script should check if the ped is on fire, if so, cancel the event.
  24. Castillo

    fire

    @DNL291: If you cancel ALL the ped's damage, then how are the players going to kill the zombies? addEventHandler ( "onClientPedDamage", root, function ( attacker, weapon, bodypart, damage ) local skin = getElementModel ( source ) if ( skin == 68 and isPedOnFire ( source ) ) then cancelEvent ( ) end end )
×
×
  • Create New...