=FAS=Shigawire
Members-
Posts
197 -
Joined
-
Last visited
Everything posted by =FAS=Shigawire
-
[Community Resource / Request] Phone Numbers!
=FAS=Shigawire replied to XetaQuake's topic in Scripting
Its possible to do. but only inside of one server. Phoning outside will not work. -
Hy, Im looking for a working query script to show server information on our Clanhomepage. Game-Monitor isnt as well as a nice php script The only scripts i found failed at connection to mta or didnt even got working
-
sure PM... if a cheater finds out how the resource works, he will find a nice way to destry much work If anyone interested of the ant-armor-cheat thing, he can contact me ^^
-
Ye.. the time outs are annoying.. and the hackers, too. Our anti-cheat script for armor kicked at least 20 palyers in 3 days *rolleyes*
-
Yo, i wonder if this script is working, but i cant test it, bcause i cant hack. ^^ addEventHandler ("onPlayerDamage", getRootElement (), local playerHealth = getElementHealth ( source ) if playerHealth == 100 then kickPlayer (source, source, "Don't hack your Health!") end ) Edit: and btw. i see: when our server gets more than 20 Players, some players will get timed out, until there are only 20 players left again. is that normal?
-
Replacing Crosshair and weapon skins possible?
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Ty.. I asked in the Scripting IRC help, they said, there is no way to replace the weapn models and HUD.txd, but ty boys. -
Hey Guys, I made a new crosshair and want to upload it on my server. I found the functions http://development.mtasa.com/index.php? ... ineLoadTXD http://development.mtasa.com/index.php? ... eImportTXD etc. but obviously an index number is needed to identify the replaced object. all others objects are working fine to replace, but the hud.txd has no index number and the weapon skins only have a weapon ID... So is there any method to replace the HUD and weapon skins? i mean, i could create static image that represents the center of the screen, but a new HUD would be more powerful
-
Can client-side script affect server-side element in client'
=FAS=Shigawire replied to DiSaMe's topic in Scripting
Whats with the "TriggerServerEvent" function? Or did i missunderstand your qustion? -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Ehm... I was talking about the gridlist... I don't think that one's needed all the time... =/ what do you mean? I was sure the gridlist is needed all the time... but i dont check why the fps decrease when i want to make the 3rd column/gridlist -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
These GUIs are needed all the time maybe i could set the 3rd window into a several script..? Edit: Doenst solve the problem with 2 several scripts and even 2 several resources the FPS go down ... i will have to make it smaller... -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
hmm, sounds pretty nice, but atm the fps problem came back. And i donkt know why. I made the addEventHandler with the Event "OnClientPalyerWeaponSwitch" then i want to add a new column, but each time i switch my weapon, the fps goes down to 30 I disabled the command line addEventHandler, and then the fps still stay at 45 : ...weaponfunction... end addEventHandler ( "onClientPlayerWeaponSwitch", getLocalPlayer(), updateWeaponSwitch) outputChatBox ( "#FF0000Hello #00FF00World", getRootElement(), 255, 255, 255, true ) -- only wanted to test of the fps is going down when this is typed... local AmmoStat = guiCreateGridList ( 0.61675, 0.02, 0.15, 0.12, true, window ) -- also if i enable only this one line, the fps goes down... i wonder why. local columna1 = guiGridListAddColumn( AmmoStat, "Ammunation", 0.85 ) local rowa1 = guiGridListAddRow ( AmmoStat ) local rowa2 = guiGridListAddRow ( AmmoStat ) local rowa3 = guiGridListAddRow ( AmmoStat ) local rowa4 = guiGridListAddRow ( AmmoStat ) local rowa5 = guiGridListAddRow ( AmmoStat ) local rowa6 = guiGridListAddRow ( AmmoStat ) guiGridListSetItemText ( AmmoStat, rowa1, columna1, "Your total Ammo:", false, false ) guiGridListSetItemText ( AmmoStat, rowa2, columna1, " ssssssss", false, false ) ... Seems the Events/commands after the "OnClientPlayerSwitchWeapon" are updated. That is crazy -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Wow, thank you Now its very easy -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Ok, thank you all, i will have a look on this. Seems it would need more time than i expected... Edit: rofl, atm its too high for me, i learned LUA through reading and testing the wiki examples .DD gonna see if i can do the same with tables and loops BUt now i understood your weapon script. But im am not sure how to use it in my script. Maybe k = weaponID and v= path of the picture? Edit2: I am an Idiot, i forgot to make the pictures invisible before switching the weapon Now it works, FPS are around 39-43 ( before : 43-45 ) -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Ouch, looks difficult. what is the k and the v representing? and how could i use it in my case? -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
1. Ok 2. I never did a loop, and what do you mean with table? I have to look in the wiki how it works 3. Thanks -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Lol, now the FPS is not decreasing, but i got the next problem, obciously, he only overlays the pictures: black = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/black.png", true, WeaponStat ) ak = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/akicon.png", true, WeaponStat ) bat = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/baticon.png", true, WeaponStat ) bomb = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/bombicon.png", true, WeaponStat ) brass = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/BRASSKNUCKLEicon.png", true, WeaponStat ) camera = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/Cameraicon.png", true, WeaponStat ) chnsaw = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/chnsawicon.png", true, WeaponStat ) chromegun = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/chromegunicon.png", true, WeaponStat ) colt = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/colt45icon.png", true, WeaponStat ) cuntgun = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/cuntgunicon.png", true, WeaponStat ) deagle = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/desert_eagleicon.png", true, WeaponStat ) flame = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/flameicon.png", true, WeaponStat ) golf = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/golfclubicon.png", true, WeaponStat ) grenade = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/grenadeicon.png", true, WeaponStat ) para = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/gun_paraicon.png", true, WeaponStat ) hsrl = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/heatseekingicon.png", true, WeaponStat ) irgoggles = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/irgogglesicon.png", true, WeaponStat ) jpack = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/jetpackicon.png", true, WeaponStat ) knife = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/knifecuricon.png", true, WeaponStat ) m4 = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/m4icon.png", true, WeaponStat ) uzi = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/micro_uziicon.png", true, WeaponStat ) minigun = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/minigunicon.png", true, WeaponStat ) molotov = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/molotovicon.png", true, WeaponStat ) mp5 = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/mp5icon.png", true, WeaponStat ) nitestick = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/nitestickicon.png", true, WeaponStat ) rocketla = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/rocketlaicon.png", true, WeaponStat ) satchel = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/satchelicon.png", true, WeaponStat ) sawnoff = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/sawnofficon.png", true, WeaponStat ) shotgspa = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/shotgspaicon.png", true, WeaponStat ) silenced = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/silencedicon.png", true, WeaponStat ) sniper = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/SNIPERicon.png", true, WeaponStat ) teargas = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/teargasicon.png", true, WeaponStat ) tec9 = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.4, "weap/tec9icon.png", true, WeaponStat ) guiSetVisible ( black, false ) guiSetVisible ( bat, false ) guiSetVisible ( bomb, false ) guiSetVisible ( brass, false ) guiSetVisible ( camera, false ) guiSetVisible ( chnsaw, false ) guiSetVisible ( chromegun, false ) guiSetVisible ( colt, false ) guiSetVisible ( cuntgun, false ) guiSetVisible ( deagle, false ) guiSetVisible ( flame, false ) guiSetVisible ( golf, false ) guiSetVisible ( grenade, false ) guiSetVisible ( para, false ) guiSetVisible ( hsrl, false ) guiSetVisible ( irgoggles, false ) guiSetVisible ( jpack, false ) guiSetVisible ( knife, false ) guiSetVisible ( m4, false ) guiSetVisible ( uzi, false ) guiSetVisible ( minigun, false ) guiSetVisible ( molotov, false ) guiSetVisible ( nitestick, false ) guiSetVisible ( rocketla, false ) guiSetVisible ( satchel, false ) guiSetVisible ( sawnoff, false ) guiSetVisible ( shotgspa, false ) guiSetVisible ( silenced, false ) guiSetVisible ( sniper, false ) guiSetVisible ( teargas, false ) guiSetVisible ( tec9, false ) guiSetVisible ( mp5, false ) guiSetVisible ( ak, false ) function updateWeaponSwitch () if ( WeaponStat ) then guiGridListClear ( WeaponStat ) local row1 = guiGridListAddRow ( WeaponStat ) local row2 = guiGridListAddRow ( WeaponStat ) local weaponType = getPlayerWeapon ( getLocalPlayer() ) guiGridListSetItemText ( WeaponStat, row2, column2, " " ..getWeaponNameFromID (weaponType).."", false, false ) guiSetVisible ( ak, false ) if ( weaponType == 30 ) then guiSetVisible ( ak, true ) elseif ( weaponType == 0 ) then guiSetVisible ( brass, true ) elseif ( weaponType == 1 ) then guiSetVisible ( brass, true ) elseif ( weaponType == 2 ) then guiSetVisible ( golf, true ) elseif ( weaponType == 3 ) then guiSetVisible ( nitestick, true ) elseif ( weaponType == 4 ) then guiSetVisible ( knife, true ) elseif ( weaponType == 5 ) then guiSetVisible ( bat, true ) elseif ( weaponType == 9 ) then guiSetVisible ( chnsaw, true ) elseif ( weaponType == 22 ) then guiSetVisible ( colt, true ) elseif ( weaponType == 23 ) then guiSetVisible ( silenced, true ) elseif ( weaponType == 24 ) then guiSetVisible ( deagle, true ) elseif ( weaponType == 25 ) then guiSetVisible ( chromegun, true ) elseif ( weaponType == 26 ) then guiSetVisible ( sawnoff, true ) elseif ( weaponType == 27 ) then guiSetVisible ( shotgspa, true ) elseif ( weaponType == 28 ) then guiSetVisible ( uzi, true ) elseif ( weaponType == 29 ) then guiSetVisible ( mp5, true ) elseif ( weaponType == 32 ) then guiSetVisible ( tec9, true ) end end end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), updateWeaponSwitch) I didnt enter all Weapon IDs becuase i am 1. very tired and 2. do i want to check, if its working. ATm its not properly: he shows 3 pictures right, the he stops at the current picture and doesnt go on, tomorrow i will make a video of that, if there isnt a solution until then -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
rofl, that are 44 pictures... I now converted them into png, from 12 kb to 1,5 each one and now i will make them invisible and visible again when it is needed -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
hi you are right, i didnt show the event, because i thought it isnt necessary to show all lines of my script SSH means SecureShell, i think, i solved this now I will now try to convert all files to png ( im an iditot, these files only got 2 colour: black and white, but i took the highest resolution ) -
Need help at getting FPS in script up :(
=FAS=Shigawire replied to =FAS=Shigawire's topic in Scripting
Hi, i am using events I saw this works more efficient the onplayerFire and onPlayerWeaponSwitch Events are already used, working fine very good i dea with pre-loading the images, thanks. Iwill try it, when i was able to understand the Server-setup manual "Log-In via SSH"... idk how -
Hey Guys, I am already working on my lil GUI.. But the weapon part decreases my fps by 15 Frames I chose the easiest and basicst method i know, and idk what to do now. I have this part of the script: ... function updateWeaponSwitch () if ( WeaponStat ) then guiGridListClear ( WeaponStat ) local row1 = guiGridListAddRow ( WeaponStat ) local row2 = guiGridListAddRow ( WeaponStat ) local weaponType = getPlayerWeapon ( getLocalPlayer() ) guiGridListSetItemText ( WeaponStat, row2, column2, " " ..getWeaponNameFromID (weaponType).."", false, false ) black = guiCreateStaticImage( 0.2, 0.3, 0.6, 0.65, "weap/black.bmp", true, WeaponStat ) if ( weaponType == 30 ) then guiStaticImageLoadImage ( black, "weap/akicon.bmp" ) elseif ( weaponType == 0 ) then guiStaticImageLoadImage ( black, "weap/BRASSKNUCKLEicon.bmp" ) elseif ( weaponType == 1 ) then guiStaticImageLoadImage ( black, "weap/BRASSKNUCKLEicon.bmp" ) elseif ( weaponType == 3 ) then guiStaticImageLoadImage ( black, "weap/nitestickicon.bmp" ) elseif ( weaponType == 4 ) then guiStaticImageLoadImage ( black, "weap/knifecuricon.bmp" ) elseif ( weaponType == 22 ) then guiStaticImageLoadImage ( black, "weap/colt45icon.bmp" ) elseif ( weaponType == 23 ) then guiStaticImageLoadImage ( black, "weap/silencedicon.bmp" ) elseif ( weaponType == 24 ) then guiStaticImageLoadImage ( black, "weap/desert_eagleicon.bmp" ) elseif ( weaponType == 25 ) then guiStaticImageLoadImage ( black, "weap/chromegunicon.bmp" ) elseif ( weaponType == 26 ) then guiStaticImageLoadImage ( black, "weap/sawnofficon.bmp" ) elseif ( weaponType == 27 ) then guiStaticImageLoadImage ( black, "weap/shotgspaicon.bmp" ) elseif ( weaponType == 28 ) then guiStaticImageLoadImage ( black, "weap/micro_uziicon.bmp" ) elseif ( weaponType == 29 ) then guiStaticImageLoadImage ( black, "weap/mp5icon.bmp" ) elseif ( weaponType == 32 ) then guiStaticImageLoadImage ( black, "weap/tec9icon.bmp" ) elseif ( weaponType == 30 ) then guiStaticImageLoadImage ( black, "weap/akicon.bmp" ) elseif ( weaponType == 31 ) then guiStaticImageLoadImage ( black, "weap/m4icon.bmp" ) elseif ( weaponType == 35 ) then guiStaticImageLoadImage ( black, "weap/rocketlaicon.bmp" ) elseif ( weaponType == 16 ) then guiStaticImageLoadImage ( black, "weap/grenadeicon.bmp" ) elseif ( weaponType == 17 ) then guiStaticImageLoadImage ( black, "weap/teargasicon.bmp" ) elseif ( weaponType == 18 ) then guiStaticImageLoadImage ( black, "weap/molotovicon.bmp" ) elseif ( weaponType == 39 ) then guiStaticImageLoadImage ( black, "weap/satchelicon.bmp" ) elseif ( weaponType == 44 ) then guiStaticImageLoadImage ( black, "weap/nvgogglesicon.bmp" ) elseif ( weaponType == 45 ) then guiStaticImageLoadImage ( black, "weap/nvgogglesicon.bmp" ) elseif ( weaponType == 46 ) then guiStaticImageLoadImage ( black, "weap/bombicon.bmp" ) end ... These pictures should be updaten when the player is switching the weapon. I used Events instead of timers (Gamersnerd ), but imho its too much work for the Program to update the pictures. Is there a method to make it non-lagging? or making it less FPS loosing? Thank You
-
rofl, sry im spamming the wrong thread with my questions But damn, you are right, the problem is the weapon code... so i will try the function you gave me
-
rofl, thats nearly not visible @nerd: lol, now the script ahs got less lines, BUT even though i disabled the setTimer: when the script is turned on, the FPS still decreases by 10 (or its more, 20 i think )
-
lol that was only an example I let him my Health update 400 ms But ATM my FPS is going down by 10 because i have a Weapon Script that contains 200 lines ^^ and it has to be updated with 150 ms ^^ So my only chance to get up my FPS, is making less lines (possible but very much work) or less iterations
-
When i use a timer to update a text (e.g. Health) i let him write the information, then i let him clear all and ket him write again. Then i set this function into a timer (e.g. to 50ms ) Then he updates the Health each 50 ms But i dont know if that works with your project. Updating a function without clearing the event before .. lol. When i did that, my MTA used 2 GB RAM after10 seconds of playing
-
Yo Guys, i got the next problem: The updateWeapon function doesnt work NO command works at the end of this script, and i ask me why.. I hoe you can follow/understand my steps, i didnt make explanations Oh, and please ignore the spammed EventHandler, i have to clean it a lil bit --THE WEAPON FUNCTION: local WeaponStat = guiCreateGridList ( 0.45, 0.02, 0.15, 0.12, true, window ) local column2 = guiGridListAddColumn( WeaponStat, "Weapon", 0.85 ) local row1 = guiGridListAddRow ( WeaponStat ) local row2 = guiGridListAddRow ( WeaponStat ) local row3 = guiGridListAddRow ( WeaponStat ) local row4 = guiGridListAddRow ( WeaponStat ) local row5 = guiGridListAddRow ( WeaponStat ) local row6 = guiGridListAddRow ( WeaponStat ) guiGridListSetItemText ( WeaponStat, row1, column2, "Your current Weapon: ", false, false ) guiGridListSetItemText ( WeaponStat, row3, column2, "Your current Ammo: ", false, false ) local ammot0 = getPlayerTotalAmmo ((getLocalPlayer()), 0) local ammot1 = getPlayerTotalAmmo ((getLocalPlayer()), 1) local ammot2 = getPlayerTotalAmmo ((getLocalPlayer()), 2) local ammot3 = getPlayerTotalAmmo ((getLocalPlayer()), 3) local ammot4 = getPlayerTotalAmmo ((getLocalPlayer()), 4) local ammot5 = getPlayerTotalAmmo ((getLocalPlayer()), 5) local ammot6 = getPlayerTotalAmmo ((getLocalPlayer()), 6) local ammot7 = getPlayerTotalAmmo ((getLocalPlayer()), 7) local ammot8 = getPlayerTotalAmmo ((getLocalPlayer()), local ammot9 = getPlayerTotalAmmo ((getLocalPlayer()), 9) local ammot10 = getPlayerTotalAmmo ((getLocalPlayer()), 10) local ammot11 = getPlayerTotalAmmo ((getLocalPlayer()), 11) local ammot12 = getPlayerTotalAmmo ((getLocalPlayer()), 12) local ammo0 = getPlayerAmmoInClip ((getLocalPlayer()), 0) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo0.. " - " ..ammot0 - ammo0.." ", false, false ) local ammo1 = getPlayerAmmoInClip ((getLocalPlayer()), 1) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo1.. " - " ..ammot1 - ammo1.." ", false, false ) local ammo2 = getPlayerAmmoInClip ((getLocalPlayer()), 2) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo2.. " - " ..ammot2 - ammo2.." ", false, false ) local ammo3 = getPlayerAmmoInClip ((getLocalPlayer()), 3) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo3.. " - " ..ammot3 - ammo3.." ", false, false ) local ammo4 = getPlayerAmmoInClip ((getLocalPlayer()), 4) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo4.. " - " ..ammot4 - ammo4.." ", false, false ) local ammo5 = getPlayerAmmoInClip ((getLocalPlayer()), 5) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo5.. " - " ..ammot5 - ammo5.." ", false, false ) local ammo6 = getPlayerAmmoInClip ((getLocalPlayer()), 6) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo6.. " - " ..ammot6 - ammo6.." ", false, false ) local ammo7 = getPlayerAmmoInClip ((getLocalPlayer()), 7) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo7.. " - " ..ammot7 - ammo7.." ", false, false ) local ammo8 = getPlayerAmmoInClip ((getLocalPlayer()), guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo8.. " - " ..ammot8 - ammo8.." ", false, false ) local ammo9 = getPlayerAmmoInClip ((getLocalPlayer()), 9) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo9.. " - " ..ammot9 - ammo9.." ", false, false ) local ammo10 = getPlayerAmmoInClip ((getLocalPlayer()), 10) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo10.. " - " ..ammot10 - ammo10.." ", false, false ) local ammo11 = getPlayerAmmoInClip ((getLocalPlayer()), 11) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo11.. " - " ..ammot11 - ammo11.." ", false, false ) local ammo12 = getPlayerAmmoInClip ((getLocalPlayer()), 12) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo12.. " - " ..ammot12 - ammo12.." ", false, false ) local weaponType = getPlayerWeapon ( getLocalPlayer()) if ( weaponType == 0 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " None" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo0.. " ", false, false ) elseif ( weaponType == 1 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Brass Knuckles" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo0.. " - " ..ammot0 - ammo0.." ", false, false ) elseif ( weaponType == 2 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " GolfClub" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo0.. " - " ..ammot0 - ammo0.." ", false, false ) elseif ( weaponType == 3 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Nightstick" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " 1 - 0 ", false, false ) elseif ( weaponType == 4 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Knife" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " 1 - 0 ", false, false ) elseif ( weaponType == 5 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Baseball Bat" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " 1 - 0 ", false, false ) elseif ( weaponType == 6 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Shovel" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " 1 - 0 ", false, false ) elseif ( weaponType == 7 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Pool Cue" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " 1 - 0 ", false, false ) elseif ( weaponType == 8 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Katana" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " 1 - 0 ", false, false ) elseif ( weaponType == 9 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Chainsaw" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " 1 - 0 ", false, false ) elseif ( weaponType == 15 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Cane" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " 1 - 0 ", false, false ) elseif ( weaponType == 22 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Pistol" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo2.. " - " ..ammot2 - ammo2.." ", false, false ) elseif ( weaponType == 23 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Silenced Pistol" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo2.. " - " ..ammot2 - ammo2.." ", false, false ) elseif ( weaponType == 24 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Desert Eagle" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo2.. " - " ..ammot2 - ammo2.." ", false, false ) elseif ( weaponType == 25 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Shotgun" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo3.. " - " ..ammot3 - ammo3.." ", false, false ) elseif ( weaponType == 26 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Sawn-Off Shotgun" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo3.. " - " ..ammot3 - ammo3.." ", false, false ) elseif ( weaponType == 27 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " SPAZ-12 Combat Shotgun" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo3.. " - " ..ammot3 - ammo3.." ", false, false ) elseif ( weaponType == 28 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Uzi" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo4.. " - " ..ammot4 - ammo4.." ", false, false ) elseif ( weaponType == 29 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " MP5" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo4.. " - " ..ammot4 - ammo4.." ", false, false ) elseif ( weaponType == 32 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Tec-9" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo4.. " - " ..ammot4 - ammo4.." ", false, false ) elseif ( weaponType == 30 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " AK-47" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo5.. " - " ..ammot5 - ammo5.." ", false, false ) elseif ( weaponType == 31 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " M4" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo5.. " - " ..ammot5 - ammo5.." ", false, false ) elseif ( weaponType == 33 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Coutry Rifle" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo6.. " - " ..ammot6 - ammo6.." ", false, false ) elseif ( weaponType == 34 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Sniper Rifle" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo6.. " - " ..ammot6 - ammo6.." ", false, false ) elseif ( weaponType == 35 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Rocket Launcher" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo7.. " - " ..ammot7 - ammo7.." ", false, false ) elseif ( weaponType == 36 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Heat-Seeking RPG" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo7.. " - " ..ammot7 - ammo7.." ", false, false ) elseif ( weaponType == 37 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Flamethrower" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo7.. " - " ..ammot7 - ammo7.." ", false, false ) elseif ( weaponType == 38 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Minigun, You shouldn't have this ;)" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo7.. " - " ..ammot7 - ammo7.." ", false, false ) elseif ( weaponType == 16 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Grenade" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo8.. " - " ..ammot8 - ammo8.." ", false, false ) elseif ( weaponType == 17 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Tear Gas" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo8.. " - " ..ammot8 - ammo8.." ", false, false ) elseif ( weaponType == 18 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Molotov Cocktail" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo8.. " - " ..ammot8 - ammo8.." ", false, false ) elseif ( weaponType == 39 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Satchel Charges" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo8.. " - " ..ammot8 - ammo8.." ", false, false ) elseif ( weaponType == 40 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Satchel Detonator" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo12.. " - " ..ammot12 - ammo12.." ", false, false ) elseif ( weaponType == 41 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Spraycan" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo9.. " - " ..ammot9 - ammo9.." ", false, false ) elseif ( weaponType == 42 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Fire Extringuisher" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo9.. " - " ..ammot9 - ammo9.." ", false, false ) elseif ( weaponType == 43 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Camera" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo9.. " - " ..ammot9 - ammo9.." ", false, false ) elseif ( weaponType == 10 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Long Purple Dildo" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo11.. " - " ..ammot11 - ammo11.." ", false, false ) elseif ( weaponType == 11 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Short tan Dildo" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo11.. " - " ..ammot11 - ammo11.." ", false, false ) elseif ( weaponType == 12 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Vibrator" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo11.. " - " ..ammot11 - ammo11.." ", false, false ) elseif ( weaponType == 14 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Flowers" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo11.. " - " ..ammot11 - ammo11.." ", false, false ) elseif ( weaponType == 44 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Night-Vision Goggles" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo11.. " - " ..ammot11 - ammo11.." ", false, false ) elseif ( weaponType == 45 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Infrared Goggles" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo11.. " - " ..ammot11 - ammo11.." ", false, false ) elseif ( weaponType == 46 ) then guiGridListSetItemText ( WeaponStat, row2, column2, " Parachute" , false, false ) guiGridListSetItemText ( WeaponStat, row4, column2, " " ..ammo11.. " - " ..ammot11 - ammo11.." ", false, false ) end end function updateWeapon() if ( WeaponStat ) then guiGridListClear ( WeaponStat ) local row1 = guiGridListAddRow ( WeaponStat ) local row2 = guiGridListAddRow ( WeaponStat ) local row3 = guiGridListAddRow ( WeaponStat ) local row4 = guiGridListAddRow ( WeaponStat ) local row5 = guiGridListAddRow ( WeaponStat ) local row6 = guiGridListAddRow ( WeaponStat ) guiGridListSetItemText ( WeaponStat, row1, column2, "Your current Weapon: ", false, false ) guiGridListSetItemText ( WeaponStat, row3, column2, "Your current Ammo: ", false, false ) local ammot0 = getPlayerTotalAmmo ((getLocalPlayer()), 0) local ammot1 = getPlayerTotalAmmo ((getLocalPlayer()), 1) local ammot2 = getPlayerTotalAmmo ((getLocalPlayer()), 2) local ammot3 = getPlayerTotalAmmo ((getLocalPlayer()), 3) local ammot4 = getPlayerTotalAmmo ((getLocalPlayer()), 4) local ammot5 = getPlayerTotalAmmo ((getLocalPlayer()), 5) local ammot6 = getPlayerTotalAmmo ((getLocalPlayer()), 6) local ammot7 = getPlayerTotalAmmo ((getLocalPlayer()), 7) local ammot8 = getPlayerTotalAmmo ((getLocalPlayer()),
