Jump to content

Xierra

Members
  • Posts

    767
  • Joined

  • Last visited

Everything posted by Xierra

  1. Xierra

    Crash when get punched

    hmm, when I play on West Coast Gaming server, After a few minutes of punching, a little bit melee error then crash! It must be a function causing this...
  2. Aww, then how SAES server hide them up... Maybe custom wanted functions? Anybody knows if there is a way to hide wanted stars HUD?
  3. Well I'm even younger, 13 and I obey what they said. Cmon, do some effort, there is no way you could waste time when you go script it.
  4. Ok, I'll change it, maybe looks good with that. Now what's the HUD component name for wanted stars?
  5. Thanks! It's working at last. Gonna be released soon as V 1.3! I'll credit you again, 50p, for the most number of helps on this script. Edit: Wait a sec, what is the HUD component name for wanted stars?
  6. So here's the update I've done: (Client-side script) 1. results given here: (On variables line, there is one variable added) -- Weapon tables for ammo. 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() health = getElementHealth( getLocalPlayer() ) lineLength1 = 114 * ( health / 100 ) -- Health bar armor = getPedArmor( getLocalPlayer() ) lineLength2 = 114 * ( armor / 100 ) -- Armor bar ammoinclip = getPedAmmoInClip (getLocalPlayer()) totalammo = getPedTotalAmmo (getLocalPlayer()) showammo1 = ammoinclip showammo2 = totalammo moneycount=getPlayerMoney(getLocalPlayer()) money= '$' ..moneycount -- Get the player's money local hour, mins = getTime () time = hour.. ':' ..mins -- Get GTA SA time local wantedlevel = getPlayerWantedLevel (getLocalPlayer()) --Getting the player's wanted level. -- End of variables line. -- first draw the stuff which is visible at all times dxDrawRectangle(sWidth-206,sHeight-43,lineLength2,14.0,tocolor(200,200,200,200),false) -- Armor active bar dxDrawRectangle(sWidth-206,sHeight-23,114.0,14.0,tocolor(50,0,0,150),false) -- Health inactive bar dxDrawRectangle(sWidth-206,sHeight-43,114.0,14.0,tocolor(50,50,50,150),false) -- Armor inactive bar dxDrawRectangle(sWidth-206,sHeight-23,lineLength1,14.0,tocolor(175,0,0,200),false) --Health active bar dxDrawRectangle(sWidth-84,sHeight-48,78.0,33.0,tocolor(0,0,0,150),false) -- GTA Time DX Rectangle 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 (time),sWidth-81,sHeight-46,sWidth-10,sHeight-16,tocolor(250,250,250,200),1.0,"diploma","center","top",false,false,false) -- GTA Time DX text local weaponID = getPedWeapon (getLocalPlayer()); -- Get weapon ID dxDrawImage(sWidth-266,sHeight-56,48.0,52.0,"icons/".. tostring( weaponID ) .. ".png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Weapon icons image. -- now decide if the optional stuff should be drawn if noreloadweapons [getPedWeapon(getLocalPlayer())] then dxDrawText(tostring (showammo2),sWidth-400,sHeight-42,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 (showammo1),sWidth-455,sHeight-41,sWidth-387,sHeight-13,tocolor(0,255,255,200),1.0,"bankgothic","right","top",false,false,false) dxDrawText("|",sWidth-381,sHeight-42,sWidth-366,sHeight-8,tocolor(255,200,0,200),1.0,"bankgothic","left","top",false,false,false) dxDrawText(tostring (showammo2),sWidth-365,sHeight-41,sWidth-272,sHeight-12,tocolor(0,255,255,200),1.0,"bankgothic","left","top",false,false,false) -- Wanted level DX images if wantedlevel = 0 then -- Draw nothing (Wanted level 0) elseif wantedlevel = 1 then dxDrawImage(1003.0,556.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,578.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,600.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,620.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,642.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,663.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Wanted level 1 elseif wantedlevel = 2 then dxDrawImage(1003.0,556.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,578.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,600.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,620.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,642.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Wanted level 2 dxDrawImage(1003.0,663.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) elseif wantedlevel = 3 then dxDrawImage(1003.0,556.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,578.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,600.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,620.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Wanted level 3 dxDrawImage(1003.0,642.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,663.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) elseif wantedlevel = 4 then dxDrawImage(1003.0,556.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,578.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,600.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Wanted level 4 dxDrawImage(1003.0,620.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,642.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,663.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) elseif wantedlevel = 5 then dxDrawImage(1003.0,556.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) dxDrawImage(1003.0,578.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Wanted level 5 dxDrawImage(1003.0,600.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,620.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,642.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,663.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) else dxDrawImage(1003.0,556.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Wanted level 6 dxDrawImage(1003.0,578.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,600.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,620.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,642.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) dxDrawImage(1003.0,663.0,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,200),false) end end end addEventHandler("onClientRender", getRootElement(), DXdraw) So what's happened here is that the script makes an error: [string = "alternate_hud\client.lua"]:101: "then" expected near "=". Anybody knows how to fix this?
  7. Well nice work again 50p! Edit: Finished making the location of its own. Preview of the image (not scripted) So the wanted star will look like that, bottom to highest. How I want it to work: Get the wanted value. If the wanted is 1, then set the r,g,b,a of the bottom star to 255,255,255,200. The rest is 0,0,0,100, and vice versa. So on the preview, it's 5 stars. One of the star on the top is inactive. I'll try to work on the script first...
  8. Well congrats Dr4x, you can use the MTA SA anytime to play and to test. I'm sure MTA SA 1.0.4 is a miracle for Linux user!
  9. Ok, thanks. But I need a good white PNG police star.
  10. Hello guys, So here's another assignment for my Alternate HUD, I want to make custom wanted stars, like in SAES server. Edit: Look at the most recent post for updates.
  11. I knew that Valhalla's First Person system (which is the best of all), works really good. Maybe follow a bit by adding on foot First Person View? btw, I'm not Vahalla owner.
  12. That script was AWESOME!! Good to see you back sharing resources. And, nice script you got there. Well what about sharing more of your scripts?
  13. Xierra

    GTA SA Menu

    Btw, I also need something like that if I want to scan user tracks. Would it be possible to put "Scan User Tracks" in MTA SA?
  14. Valhalla uses bone location, so it will fit on ALL skins.
  15. Good work! I think you abandoned it just now. Good for RPG's only! Please don't use it on Freeroam, cause you can use jetpacks that easily, unless you remove jetpack detection.
  16. I don't really know what happened, but the biggest reason might be deprecated functions.
  17. Hmm, yeah I think Valhalla's login system was so advanced! I really wanna know how they did all those for a simple thing. Valhalla mostly have really advanced scripts, included in the server. I was so pleased if they release at least one of their resources?
  18. Good work, keep finding for those address values.
  19. Umm, I'm not a programmer, sorry. But I think I will check out the trainers. Maybe they have the memory adresses. Edit: Damn it's a bit hard to find, I think someone else can also help it. I also made a post at this web: http://www.gtaforums.com/index.php?show ... 99&st=1080
  20. Hi guys! I want the MTA Team to add these functions client side & server side: setPedOxygenLevel (ped thePlayer, amount) getPedOxygenLevel (ped thePlayer) With getting at amount 0 - 100, as on the example below. example: function getBreath breath = getPedOxygenLevel (getLocalPlayer()) if breath <=25 then outputChatBox("Get out of the water now! You're drowning!!" , 255,0,0, true) else outputChatBox ("You still can hold your breath longer.", 255, 255, 0, true) end end addCommandHandler("checklung", getBreath) PS: Dunno if it works! Phatlooser already requested for this. But nobody looks at it? These functions are used to get the oxygen amount / lung capacity (as seen on the bar between armor and health when in water) It would be good to you guys if these functions are added. The Bugs page: http://www.bugs.mtasa.com/view.php?id=5350 And I confirmed at that suggestion.
  21. Xierra

    Invalid Nick

    Learn English more! Well at least the alternative is http://www.translate.google.com, just use your native language and translate into english over there. I can't understand most of your words btw.
  22. Namorek, the first script you put already works. Just make a meta.xml, it's one requirement for every script, if you think it still doesn't work.
  23. Here's the way: showPlayerHudComponent("radar", false) This one hides the radar. And showPlayerHudComponent("radar", true) This one shows the radar. So True and False determines if the HUD component shows or not.
  24. No, you can't just request like that. Make your own! And, that picture must be from Full Theft Auto.
  25. Xierra

    Floor names

    Well, floors are rare and hard to find, but I agree to Wallmart. Because, he's not a modeller, including me myself, I can't make models.
×
×
  • Create New...