|
You last visited: Today at 10:46
Advertisement
Mta SA Nitro Script
Discussion on Mta SA Nitro Script within the Grand Theft Auto forum part of the Other Online Games category.
05/01/2013, 15:29
|
#1
|
elite*gold: 6
Join Date: Jun 2010
Posts: 2,346
Received Thanks: 411
|
Mta SA Nitro Script
Hey Leute .
Wie kriege ich es hin dass wenn ein Auto z.B. Nitro Groß kauft das er das Nitro peer Mausklick so Lange benutzen kann wie er will (Sprich er drückt 1sec. Maus dann geht das Nitro Auch nur 1sec.) und wenn das Nitro leer ist das es beim Nächsten Car Respawn wieder voll ist.
Und :
Wir haben ne Hungerleiste nur kommt sie nur wenn man EIn Geträmk kauft dass sie ganz kurz da ist und es kommt auch die Meldung dass man sich Essen kaufen solle doch man Sieht die Hungerleiste nicht.
|
|
|
05/03/2013, 15:55
|
#2
|
elite*gold: 111
Join Date: Apr 2013
Posts: 216
Received Thanks: 11
|
Zum 2. Punkte: Wie sieht denn das Script aus?
|
|
|
05/03/2013, 19:45
|
#3
|
elite*gold: 6
Join Date: Jun 2010
Posts: 2,346
Received Thanks: 411
|
Code:
fullBarSize = 128
setElementData ( lp, "hunger", 50, false )
function showHungerBar()
if tonumber ( getElementData ( lp, "loggedin" ) ) == 1 and not isCursorShowing () then
if gImage["foodbarBeginning"] then
guiSetVisible ( gImage["foodbarBeginning"], false )
guiSetVisible ( gImage["foodbarMiddle"], false )
guiSetVisible ( gImage["foodbarEnding"], false )
else
local screenwidth, screenheight = guiGetScreenSize ()
if screenwidth == 1440 then
gImage["foodbarBeginning"] = guiCreateStaticImage(screenwidth-211,113,5,18,"images/foodbar2.bmp",false)
gImage["foodbarMiddle"] = guiCreateStaticImage(screenwidth-206,113,fullBarSize,18,"images/foodbar1.bmp",false)
gImage["foodbarEnding"] = guiCreateStaticImage(screenwidth-211,113,5,18,"images/foodbar2.bmp",false)
else
gImage["foodbarBeginning"] = guiCreateStaticImage(screenwidth-211,0+20,5,18,"images/foodbar2.bmp",false)
gImage["foodbarMiddle"] = guiCreateStaticImage(screenwidth-206,0+20,fullBarSize,18,"images/foodbar1.bmp",false)
gImage["foodbarEnding"] = guiCreateStaticImage(screenwidth-211,0+20,5,18,"images/foodbar2.bmp",false)
end
end
resizeHungerBar()
end
end
function hungerDeathFix ()
if source == lp then
setElementData ( lp, "hunger", 40 )
end
end
addEventHandler ( "onClientPlayerWasted", getRootElement(), hungerDeathFix )
function resizeHungerBar()
local screenwidth, screenheight = guiGetScreenSize ()
local curfood = tonumber ( getElementData ( lp, "hunger" ) )
local barxsize = curfood/100*fullBarSize
guiSetSize ( gImage["foodbarMiddle"], barxsize, 18, false )
if screenwidth == 1440 then
guiSetPosition ( gImage["foodbarEnding"], screenwidth-206+barxsize, 113, false )
guiBringToFront ( gImage["foodbarEnding"] )
else
guiSetPosition ( gImage["foodbarEnding"], screenwidth-206+barxsize, 0+20, false )
guiBringToFront ( gImage["foodbarEnding"] )
end
end
function hideHungerBar()
guiSetVisible ( gImage["foodbarBeginning"], false )
guiSetVisible ( gImage["foodbarMiddle"], false )
guiSetVisible ( gImage["foodbarEnding"], false )
end
function moreHunger()
if getElementData ( lp, "jailtime" ) then
if getElementData ( lp, "jailtime" ) <= 0 and not pokering and not invulnerable then
local curhunger = getElementData ( lp, "hunger" ) - 1
if curhunger < 0 then curhunger = 0 end
setElementData ( lp, "hunger", curhunger, false )
if curhunger == 33 then
outputChatBox ( "Achtung, Du Wirst Bald Hungern , besorg dir etwas zu Essen!", 125, 0, 0 )
elseif curhunger < 25 then
local loss = math.floor((25-curhunger)/2*20)/10
setElementHealth ( lp, getElementHealth ( lp ) - loss )
hudEinblendenDmg_func ( 0, 0, 0, 0, false )
end
end
end
end
setTimer ( moreHunger, 50000, -1 )
function eatSomething_func ( value )
if not value then value = 100 end
setElementData ( lp, "hunger", getElementData ( lp, "hunger" )+value, false )
if getElementData ( lp, "hunger" ) > 100 then
setElementData ( lp, "hunger", 100, false )
end
showHungerBar()
setTimer ( hideHungerBar, 4000, 1 )
end
addEvent ( "eatSomething", false )
addEventHandler ( "eatSomething", getRootElement(), eatSomething_func )
|
|
|
05/04/2013, 01:07
|
#4
|
elite*gold: 159
Join Date: Sep 2010
Posts: 3,001
Received Thanks: 598
|
Müsste bei der Funktion "function showHungerBar()" der Wert nicht auf true sein? Also statt guiSetVisible ( gImage["foodbarBeginning"], false ) dann guiSetVisible ( gImage["foodbarBeginning"], true ). Ich kenn mich mit Lua nicht so aus, aber es sieht ein bisschen so aus.
|
|
|
05/04/2013, 13:11
|
#5
|
elite*gold: 6
Join Date: Jun 2010
Posts: 2,346
Received Thanks: 411
|
Quote:
Originally Posted by Yasunai
Müsste bei der Funktion "function showHungerBar()" der Wert nicht auf true sein? Also statt guiSetVisible ( gImage["foodbarBeginning"], false ) dann guiSetVisible ( gImage["foodbarBeginning"], true ). Ich kenn mich mit Lua nicht so aus, aber es sieht ein bisschen so aus.
|
Nope.
|
|
|
05/05/2013, 11:25
|
#6
|
elite*gold: 111
Join Date: Apr 2013
Posts: 216
Received Thanks: 11
|
Quote:
Originally Posted by ingo69
Code:
fullBarSize = 128
setElementData ( lp, "hunger", 50, false )
function showHungerBar()
if tonumber ( getElementData ( lp, "loggedin" ) ) == 1 and not isCursorShowing () then
if gImage["foodbarBeginning"] then
guiSetVisible ( gImage["foodbarBeginning"], false )
guiSetVisible ( gImage["foodbarMiddle"], false )
guiSetVisible ( gImage["foodbarEnding"], false )
else
local screenwidth, screenheight = guiGetScreenSize ()
if screenwidth == 1440 then
gImage["foodbarBeginning"] = guiCreateStaticImage(screenwidth-211,113,5,18,"images/foodbar2.bmp",false)
gImage["foodbarMiddle"] = guiCreateStaticImage(screenwidth-206,113,fullBarSize,18,"images/foodbar1.bmp",false)
gImage["foodbarEnding"] = guiCreateStaticImage(screenwidth-211,113,5,18,"images/foodbar2.bmp",false)
else
gImage["foodbarBeginning"] = guiCreateStaticImage(screenwidth-211,0+20,5,18,"images/foodbar2.bmp",false)
gImage["foodbarMiddle"] = guiCreateStaticImage(screenwidth-206,0+20,fullBarSize,18,"images/foodbar1.bmp",false)
gImage["foodbarEnding"] = guiCreateStaticImage(screenwidth-211,0+20,5,18,"images/foodbar2.bmp",false)
end
end
resizeHungerBar()
end
end
function hungerDeathFix ()
if source == lp then
setElementData ( lp, "hunger", 40 )
end
end
addEventHandler ( "onClientPlayerWasted", getRootElement(), hungerDeathFix )
function resizeHungerBar()
local screenwidth, screenheight = guiGetScreenSize ()
local curfood = tonumber ( getElementData ( lp, "hunger" ) )
local barxsize = curfood/100*fullBarSize
guiSetSize ( gImage["foodbarMiddle"], barxsize, 18, false )
if screenwidth == 1440 then
guiSetPosition ( gImage["foodbarEnding"], screenwidth-206+barxsize, 113, false )
guiBringToFront ( gImage["foodbarEnding"] )
else
guiSetPosition ( gImage["foodbarEnding"], screenwidth-206+barxsize, 0+20, false )
guiBringToFront ( gImage["foodbarEnding"] )
end
end
function hideHungerBar()
guiSetVisible ( gImage["foodbarBeginning"], false )
guiSetVisible ( gImage["foodbarMiddle"], false )
guiSetVisible ( gImage["foodbarEnding"], false )
end
function moreHunger()
if getElementData ( lp, "jailtime" ) then
if getElementData ( lp, "jailtime" ) <= 0 and not pokering and not invulnerable then
local curhunger = getElementData ( lp, "hunger" ) - 1
if curhunger < 0 then curhunger = 0 end
setElementData ( lp, "hunger", curhunger, false )
if curhunger == 33 then
outputChatBox ( "Achtung, Du Wirst Bald Hungern , besorg dir etwas zu Essen!", 125, 0, 0 )
elseif curhunger < 25 then
local loss = math.floor((25-curhunger)/2*20)/10
setElementHealth ( lp, getElementHealth ( lp ) - loss )
hudEinblendenDmg_func ( 0, 0, 0, 0, false )
end
end
end
end
setTimer ( moreHunger, 50000, -1 )
function eatSomething_func ( value )
if not value then value = 100 end
setElementData ( lp, "hunger", getElementData ( lp, "hunger" )+value, false )
if getElementData ( lp, "hunger" ) > 100 then
setElementData ( lp, "hunger", 100, false )
end
showHungerBar()
setTimer ( hideHungerBar, 4000, 1 )
end
addEvent ( "eatSomething", false )
addEventHandler ( "eatSomething", getRootElement(), eatSomething_func )
|
Ich finde nix wo 'lp' definiert ist..
|
|
|
05/06/2013, 16:22
|
#7
|
elite*gold: 6
Join Date: Jun 2010
Posts: 2,346
Received Thanks: 411
|
function hideHungerBar()
guiSetVisible ( gImage["foodbarBeginning"], false )
guiSetVisible ( gImage["foodbarMiddle"], false )
guiSetVisible ( gImage["foodbarEnding"], false )
Könnte es daran liegen ?
|
|
|
05/07/2013, 19:01
|
#8
|
elite*gold: 50
Join Date: Apr 2011
Posts: 9,249
Received Thanks: 1,708
|
Schreib mal bei der Function in der Klammer false rein.
Bin mir aber nicht sicher.
|
|
|
05/09/2013, 15:54
|
#9
|
elite*gold: 6
Join Date: Jun 2010
Posts: 2,346
Received Thanks: 411
|
nup
|
|
|
 |
Similar Threads
|
Nitro's Levelservice
09/03/2012 - World of Warcraft Trading - 20 Replies
~Bot ist eine Woche nicht verfügbar, solange bleibt mein Levelservice zu (vorraussichtlich bis zum 5.9) ~
http://www.abload.de/img/1obenp3b7r.pnghttp://www .abload.de/img/mitte2-01sa82.pnghttp://www.abload. de/img/mitte2-1psakx.pnghttp://www.abload.de/img/m itte2-2a7l50.pnghttp://www.abload.de/img/mitte2-3b zyq5.pnghttp://www.abload.de/img/mitte2-49pbo8.png http://www.abload.de/img/untenvrso6.pnghttp://www. abload.de/img/unten2r6jem.png
~Bot ist eine Woche nicht verfügbar, solange bleibt mein...
|
[How to]Gta 4 Nitro Mod einfügen
02/11/2012 - Grand Theft Auto - 3 Replies
Hallo Leute, ich hatte mal ein bisschen Zeit und ich dachte ich erklähr mal wie man einen Nitro Mod in Gta IV installiert:
-Ihr ladet euch Nitro Mod.rar im Anhang runter und entpackt es
-Geht in den Systemordner von Gta IV ...:/.../Rockstar Games/Grand Theft Auto IV(je nach dem wo ihr es installiert habt)
Für Patch V5 und niedrieger(auch V1 also normal):
-Kopiert den ASILoader(dsound.dll), SkriptHook.dll - OLD Patches, Nitro - OLD Patches.asi, nitro.ini, nitro.wav und nitrofade.wav...
|
WTS Thread from Nitro
12/03/2010 - Archlord Trading - 12 Replies
Guys who not care about my Offer and just wanna ruin my iTrader Rating should stop to read here.
I Sell/trade a LvL 86 & 80% Ele at Brumhart (Eu 3 / Urzak)
5/5 Realm
4/4 Chaotic Realm
Intelligent Blode 10% Resi Stone
Intelligent Shuta 9% Resi Stone
Karkaen Necklace Infinity wings
|
Nitro Boosts (Engineering)
12/10/2008 - WoW Exploits, Hacks, Tools & Macros - 0 Replies
We all know how Blizzard nerfed the Rocket Boots Xtreme to make you drop the WSG flag when you activate them.
This may or may not be intended but the new Engineering Nitro Boosts will not make you drop the WSG flag upon activation, therefore a quick cap if used properly or if used in combination with Parachute Cloak or Flexweave Underlay.
|
All times are GMT +1. The time now is 10:47.
|
|