
=FAS=Shigawire
Members-
Posts
197 -
Joined
-
Last visited
Everything posted by =FAS=Shigawire
-
Ok, ty. But i see, too much work ^^. So i will try to sclae the text a bit..
-
Thanks for replies Guys (uuh.. Metaphers) I think, i wont die because of this clock issue. Thanks for giving information about the Alpha I will make a Gui overlaying the CLock. In the Gui Informations like Game-Time and Real-Time should be shown . But until then its a long way through several Guides and Tutorials ATM i try to colour the Health Status (if >30% => colour = red, etc...) BTW. Is it possible to change the scale and colour of a text that is in a GridList?: eg this one: guiGridListSetItemText ( HealthStat, 2, 1, "Your current Health: ", false, false ) i want to use this Function textitem textCreateTextItem ( [string text, float x, float y, string priority, int red = 255, int green = 0, int blue = 0, int alpha = 255, float scale = 1, string alignX = "left", string alignY = "top"] ) MEans: Is it possible to set the font/colour of only ONE row? I could only edit the whole GUI: guiSetFont (HealthStat, "sa-gothic" ) --This works only for the whole column "HealthStat". Is it posssible to make these settings on only one row? Edit: rofl. thats crazy: for getting shown Player's Health correntcly, i needed 3 days. for getting shown Player's Armor correctly, i needed 20 seconds
-
Lol, thank you. Thats sad. I could place a Gui over the clock, but i want to set the Gui's Alpha ^^. So it wouldnt look good if there is a clock in the background.-.
-
Ahh, thx. this would make the search for the command easier
-
Yeah, than you guys, now the script is working perfectly: function clientsideResourceStart () -- Create the grid list element local HealthStat = guiCreateGridList ( 0.45, 0.45, 0.15, 0.15, true ) local column = guiGridListAddColumn( HealthStat, "Health", 0.85 ) local playerHealth = getElementHealth ( getLocalPlayer() ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) guiGridListSetItemText ( HealthStat, 1, 1, "You are Alive/Dead", false, false ) guiGridListSetItemText ( HealthStat, 2, 1, "Your current Health: " .. getElementHealth(getLocalPlayer()), false, false ) guiGridListSetItemText ( HealthStat, 3, 1, "Your current Armor: ", false, false ) --guiGridListSetItemText ( HealthStat, 3, 1, "Your current Armor: ", false, false ) function updateHealth() if ( HealthStat ) then guiGridListClear ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local playerHealth = getElementHealth ( getLocalPlayer() ) guiGridListSetItemText ( HealthStat, 1, column, "You are Alive/Dead", false, false ) guiGridListSetItemText ( HealthStat, 2, column, "Your current Health: " .. getElementHealth(getLocalPlayer()), false, false ) guiGridListSetItemText ( HealthStat, 3, column, "Your current Armor: ", false, false ) end end setTimer ( updateHealth, 500, 0 ) end addEventHandler ( "onClientResourceStart", getRootElement(), clientsideResourceStart, showLocalHealth, getElementHealth, updateHealth ) Some examples in the wiki are grving these commands. And only with guiGridListAddRow the Status is working right This script is unfinished, but the main thing is done. Btw.: I could disable everything without the clock (i said is in my other Topic). But when you get idle in Stealth, he will disable Everything, also the clock... So i should have alook on the Stealth code ...
-
lol thank you Seems i have to learn a lot more ^^
-
Hi there, I feel like a noob, you talk about creating moving fences and i fail at making a Health Window I made this script: function clientsideResourceStart () -- Create the grid list element local HealthStat = guiCreateGridList ( 0.45, 0.45, 0.15, 0.2, true ) local column = guiGridListAddColumn( HealthStat, "Health", 0.85 ) local playerHealth = getElementHealth ( getLocalPlayer() ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) guiGridListSetItemText ( HealthStat, 1, 1, "You are Alive/Dead", false, false ) guiGridListSetItemText ( HealthStat, 2, 1, "Your current Health: " .. playerHealth, false, false ) guiGridListSetItemText ( HealthStat, 3, 1, "Your current Armor: ", false, false ) --guiGridListSetItemText ( HealthStat, 3, 1, "Your current Armor: ", false, false ) setTimer ( HealthStatRefresh, 500, 100 ) -- Should work 50 seconds afer starting resource end addEventHandler ( "onClientResourceStart", getRootElement(), clientsideResourceStart, showLocalHealth, getElementHealth, HealthStatRefresh ) function HealthStatRefresh () if ( HealthStat ) then guiGridListClear ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) local row = guiGridListAddRow ( HealthStat ) --lol, dunno why, but i made 4 rows local playerHealth = getElementHealth ( getLocalPlayer() ) guiGridListSetItemText ( HealthStat, 2, 1, "Your current Health: " .. playerHealth, false, false ) end end Its showing the Health Status fine, but only one time (when the resource is started), when the player looses Health, it still shows Health: 100... when restarting the script, it shows the right Health Status.. So obviously the Refresh part doesnt work, sry if its a clear and easy fault, but i didnt detect it. And btw. I know this is very crappy scripted, but i did my best and the position of the window will be changed soon Thank You
-
How do i install map editor in MTASA DM?
=FAS=Shigawire replied to razvan96's topic in DM Client-side
OR youse the MTA Race Editor. IMHO its the best one.... the SAMP Editor isnt bad either -
Rofl, problem with disabling the clock :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Sry that i didnt post before: function clientsideResourceStart () -- Create the grid list element local HealthStat = guiCreateGridList ( 0.45, 0.45, 0.15, 0.15, true ) local column = guiGridListAddColumn( HealthStat, "Health", 0.85 ) guiGridListSetItemText ( HealthStat, guiGridListAddRow ( HealthStat ), column, "You are Alive/Dead)", false, false ) local playerHealth = getElementHealth ( getLocalPlayer() ) guiGridListSetItemText ( HealthStat, guiGridListAddRow ( HealthStat ), column, "Your current Health: " .. playerHealth, false, false ) guiGridListSetItemText ( HealthStat, guiGridListAddRow ( HealthStat ), column, " ", false, false ) --Placeholder guiGridListSetItemText ( HealthStat, guiGridListAddRow ( HealthStat ), column, "Your current Armor:", false, false ) end addEventHandler ( "onClientResourceStart", getRootElement(), clientsideResourceStart, "showhealth", showLocalHealth ) Thats my fist try to Show the players Health so please, ignore the other scripted waste Its a small Gui, in the Scoreboard are a lot of refreshing functions, but i dont cheack them all... Yes, i solved this problem I meant a bar on the left side, overlaying the clock -
Rofl, problem with disabling the clock :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Hm, i got next problem, but i dont want to make a new topic for each problems : Is there a refresh function? I made a Gui, in which the Health is shown (100, when player join) but when i get killed, or the Health is decreasing, the value still stay at 100... I think, the Health request must be refreshed like in the scoreboard, but cant filter the right command out -
Rofl, problem with disabling the clock :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
lol, would it be overlayed when i place a sidepanel over it? -
Lol, am i an idiot to fail with the easiest script or is this an error: i try to disable all components of the HUD. Most of them work, but the clock is still shown.. The code should be right: function hudChanger () showPlayerHudComponent ( source, "ammo", false ) showPlayerHudComponent ( source, "clock", false ) -- idk why not working showPlayerHudComponent ( source, "weapon", false ) showPlayerHudComponent ( source, "armour", false ) showPlayerHudComponent ( source, "breath", false ) showPlayerHudComponent ( source, "health", false ) showPlayerHudComponent ( source, "money", false ) showPlayerHudComponent ( source, "radar", true ) -- radar should be shown showPlayerHudComponent ( source, "area_name", false ) showPlayerHudComponent ( source, "vehicle_name", false ) end -- rofl addEventHandler ( "onPlayerJoin", getRootElement(), hudChanger ) Anyone got an idea? ATM its server-script, Client doesnt work either
-
Lol. They make decisions about dp4.0 *lol* First dp3 has to work correctly
-
rofl, thank you. Wil it be available in dp3?
-
Hi there, Now i startet working with the Lua Tutorials and i got one question: Is it possible to play a sound file at a specific time? E.g.: There is this Headshot ressource: addEvent "onPlayerHeadshot" addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then killPlayer(source, attacker, weapon, bodypart) end end end ) Now i got the Headshot sound from CS, is it possible to play the file when the Player IS killed by headshot?. Atm i didnt find a lua command to play music files And one more: When one team wins the round (or Tie), would it be possible to play several soundfiles to each team? E.g.: Team read wins, now "Missioncomplete.mp3" should be played but only for red team. FOr Blue Team the file "yoursquadhasbeeneleminated.mp3" should be played. Is this possible? In the Wiki i only found something about playMissionAudio and playSoundFrontEnd . Maybe it is possible to specify an int from playMissionAudio as sound file?
-
did you download the new (dp2.2) version?
-
I can't see my health, armor, weapons, or money bar (Help!)
=FAS=Shigawire replied to Jayster's topic in DM Client-side
Do you use the Camhack? -
There wont be any No-Serial server, without preparing them
-
Thats a non-solved question Could be tomorrow, next month, next year
-
Ehhm, du wirst es sehen, wennn die dp3 draussen ist You'll see when dp3 is released
-
DAmn, it works. Good Job
-
I can't find my own MTA:SA DM server in the browser list!
=FAS=Shigawire replied to GTA-FREAK[Ger]'s topic in DM Server-side
You dont have to register the server Ports opened? -
If you are having SERIAL Problems, Read this!!
=FAS=Shigawire replied to fgwelder's topic in DM Client-side
LMOA!!!! Spam Because you will become the most hated person from the server admins -
If you are having SERIAL Problems, Read this!!
=FAS=Shigawire replied to fgwelder's topic in DM Client-side
Don't do it. -
If you are having SERIAL Problems, Read this!!
=FAS=Shigawire replied to fgwelder's topic in DM Client-side
Yes, right