
undefined
Members-
Posts
500 -
Joined
-
Last visited
Everything posted by undefined
-
Thank you Lioner. I will try your example. But before doing anything else. Look at that, will you? --Shotgun----Shotgun-- function SLev1 () takePlayerMoney ( source, 5000 ) setPedStat(source, 72 and 73, 200) end addEvent ("SStats1", true) addEventHandler ( "SStats1", getRootElement(), SLev1 ) function SLev2 () local stat = getPedStat ( source, 72 and 73 ) takePlayerMoney ( source, 20000 ) setPedStat(source, 72 and 73, stat+200) end addEvent ("SStats2", true) addEventHandler ( "SStats2", getRootElement(), SLev2 ) function SLev3 () local stat = getPedStat ( source, 72 and 73 ) takePlayerMoney ( source, 40000 ) setPedStat(source, 72 and 73, stat+200) end addEvent ("SStats3", true) addEventHandler ( "SStats3", getRootElement(), SLev3 ) function SLev4 () local stat = getPedStat ( source, 72 and 73 ) takePlayerMoney ( source, 65000 ) setPedStat(source, 72 and 73, stat+200) end addEvent ("SStats4", true) addEventHandler ( "SStats4", getRootElement(), SLev4 ) function SLev5 () local stat = getPedStat ( source, 72 and 73 ) takePlayerMoney ( source, 95000 ) setPedStat(source, 72 and 73, stat+200) end addEvent ("SStats5", true) addEventHandler ( "SStats5", getRootElement(), SLev5 ) --Shotgun----Shotgun-- 72: WEAPONTYPE_SHOTGUN_SKILL 73: WEAPONTYPE_SAWNOFF_SHOTGUN_SKILL This is only raises the sawn-off-shotgun. What's the problem?
-
Lionel, bro. This is very tangled. Could you give information about how do I do?
-
While level 1 is not active, a without Level 2, Level 3, Level 4 and Level 5 not active. In addition to Level 1 After activating Pressing not click it again. (My English is very bad. Sry.)
-
Oh, sorry. Meta.xml ''m also delete the server. And thank you Krzo andLiOneLMeSsIShoT. However, there will be more a question. Without pressing Level 1, Level 2-3-4-5 is not pressed how can I do?
-
function status() SWindow = guiCreateWindow(448, 278, 687, 321, "Status", false) guiWindowSetSizable(SWindow, false) guiSetAlpha(SWindow, 0.60) PGrid = guiCreateGridList(10, 33, 667, 44, false, SWindow) PLabelSol = guiCreateLabel(11, 10, 91, 24, "Pistol", false, PGrid) guiSetFont(PLabelSol, "default-bold-small") guiLabelSetHorizontalAlign(PLabelSol, "center", false) guiLabelSetVerticalAlign(PLabelSol, "center") PLabelSag = guiCreateLabel(567, 10, 91, 24, "Pistol", false, PGrid) guiSetFont(PLabelSag, "default-bold-small") guiLabelSetHorizontalAlign(PLabelSag, "center", false) guiLabelSetVerticalAlign(PLabelSag, "center") PLevel1 = guiCreateButton(112, 11, 81, 23, "Level 1", false, PGrid) PLevel2 = guiCreateButton(203, 11, 81, 23, "Level 2", false, PGrid) PLevel3 = guiCreateButton(294, 11, 81, 23, "Level 3", false, PGrid) PLevel4 = guiCreateButton(385, 11, 81, 23, "Level 4", false, PGrid) PLevel5 = guiCreateButton(476, 11, 81, 23, "Level 5", false, PGrid) triggerServerEvent ( "PLev1", source ) triggerServerEvent ( "PLev2", source ) triggerServerEvent ( "PLev3", source ) triggerServerEvent ( "PLev4", source ) triggerServerEvent ( "PLev5", source ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), status ) function statusop() if (guiGetVisible (SWindow) == true) then guiSetVisible(SWindow, false) showCursor(false) elseif (guiGetVisible (SWindow) == false) then guiSetVisible(SWindow, true) showCursor(true) end end bindKey ("F7", "down", statusop) function PistolLevel1 () takePlayerMoney ( source, 5000 ) setPedStat(source, 69, 200) end addEvent( "PLev1", true ) addEventHandler( "PLev1", root, PistolLevel1 ) function PistolLevel2 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 20000 ) setPedStat(source, 69, stat+200) end addEvent( "PLev2", true ) addEventHandler( "PLev2", root, PistolLevel2 ) function PistolLevel3 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 40000 ) setPedStat(source, 69, stat+200) end addEvent( "PLev3", true ) addEventHandler( "PLev3", root, PistolLevel3 ) function PistolLevel4 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 65000 ) setPedStat(source, 69, stat+200) end addEvent( "PLev4", true ) addEventHandler( "PLev4", root, PistolLevel4 ) function PistolLevel5 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 95000 ) setPedStat(source, 69, stat+200) end addEvent( "PLev5", true ) addEventHandler( "PLev5", root, PistolLevel5 )
-
State does not change and does not take money.
-
Client function status() SWindow = guiCreateWindow(448, 278, 687, 321, "Status", false) guiWindowSetSizable(SWindow, false) guiSetAlpha(SWindow, 0.60) PGrid = guiCreateGridList(10, 33, 667, 44, false, SWindow) PLabelSol = guiCreateLabel(11, 10, 91, 24, "Pistol", false, PGrid) guiSetFont(PLabelSol, "default-bold-small") guiLabelSetHorizontalAlign(PLabelSol, "center", false) guiLabelSetVerticalAlign(PLabelSol, "center") PLabelSag = guiCreateLabel(567, 10, 91, 24, "Pistol", false, PGrid) guiSetFont(PLabelSag, "default-bold-small") guiLabelSetHorizontalAlign(PLabelSag, "center", false) guiLabelSetVerticalAlign(PLabelSag, "center") PLevel1 = guiCreateButton(112, 11, 81, 23, "Level 1", false, PGrid) PLevel2 = guiCreateButton(203, 11, 81, 23, "Level 2", false, PGrid) PLevel3 = guiCreateButton(294, 11, 81, 23, "Level 3", false, PGrid) PLevel4 = guiCreateButton(385, 11, 81, 23, "Level 4", false, PGrid) PLevel5 = guiCreateButton(476, 11, 81, 23, "Level 5", false, PGrid) addEventHandler ( "onClientGUIClick", PLevel1, PLev1, false ) addEventHandler ( "onClientGUIClick", PLevel2, PLev2, false ) addEventHandler ( "onClientGUIClick", PLevel3, PLev3, false ) addEventHandler ( "onClientGUIClick", PLevel4, PLev4, false ) addEventHandler ( "onClientGUIClick", PLevel5, PLev5, false ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), status ) function statusop() if (guiGetVisible (SWindow) == true) then guiSetVisible(SWindow, false) showCursor(false) elseif (guiGetVisible (SWindow) == false) then guiSetVisible(SWindow, true) showCursor(true) end end bindKey ("F7", "down", statusop) Server function PLev1 () takePlayerMoney ( source, 5000 ) setPedStat(source, 69, 200) end addEventHandler ( "onClientGUIClick", getRootElement(), PLev1 ) function PLev2 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 20000 ) setPedStat(source, 69, stat+200) end addEventHandler ( "onClientGUIClick", getRootElement(), PLev2 ) function PLev3 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 40000 ) setPedStat(source, 69, stat+200) end addEventHandler ( "onClientGUIClick", getRootElement(), PLev3 ) function PLev4 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 65000 ) setPedStat(source, 69, stat+200) end addEventHandler ( "onClientGUIClick", getRootElement(), PLev4 ) function PLev5 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 95000 ) setPedStat(source, 69, stat+200) end addEventHandler ( "onClientGUIClick", getRootElement(), PLev5 ) Why not worrk!!
-
function playerLogin (the... ERROR: Jack/script.lua:147: bad argument #1 to 'pairs' <table expected, got nil>
-
addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", root, function ( theKiller ) local h = getTime() if h > 20 or h < 6 if theKiller then addPlayerEXP( theKiller, math.random(120, 200 )) else addPlayerEXP( theKiller, math.random(30, 60 )) end end end ) Error SCRIPT ERROR: Jack/exp.lua:6: 'then' expected near 'if'
-
Watch pls! Help me pls addEventHandler ( "onClientRender", root, function ( ) local level = ( getElementData ( localPlayer, "level" ) or 0 ) local _, required = exports [ "Jack" ]:getLevelData ( level ) if ( required ) then local exp_ = ( getElementData ( localPlayer, "exp" ) or 0 ) local ExpBar = ( 150 * ( ( exp_ % required ) / required ) ) dxDrawRectangle ( sWidth - 185, sHeight - 186.5, 154, 6.5, tocolor ( 0, 0, 0, 255 ), false )-- Exp Bar dxDrawRectangle ( sWidth - 183, sHeight - 185, ExpBar, 3.5, tocolor ( 255, 255, 255, 255 ), false ) -- Exp end end )
-
10 level 10000 exp 11 level 14000 exp This indicator is a showing 0 to 14000 exp so show 14000 exp in 10000. I want to show 10000 to 14000 exp so 4000 exp. Do you understand me?
-
This indicator is a showing 0 to 14000 exp so show 14000 exp in 10000.
-
Oh sry. Thank you very much. Its worked.
-
addEventHandler("onClientRender",root, function( ) local level = ( getElementData ( localPlayer, "level" ) or 0 ) local exp_ = ( getElementData ( localPlayer, "exp" ) or 0 ) local ExpBar = 150 * (( exp_ % level )/level) dxDrawRectangle(sWidth-185,sHeight-136.5, 154, 6.5, tocolor ( 0, 0, 0, 255 ), false)-- Exp Bar dxDrawRectangle(sWidth-183,sHeight-135,ExpBar,3.5,tocolor(255,255,255,255) ,false) -- Exp end ) Where is the my mistake?
-
My english is bad. I can't understand
-
What can I write instead of 350? Each level will change anything?
-
(Level 5) Unfortunately, the error occurs. What can I write instead of 350? Each level will change anything?
-
Hi Guys. Im using Castillo's Exp system. I want to do an indicator for the level and im do it. But it does not work the way I want. When i jump level rectangle is not reset. addEventHandler("onClientRender",root, function() exp =( getElementData ( localPlayer, "exp" )) ExpBar = 150 * ( exp / 350 ) dxDrawRectangle(sWidth-185,sHeight-186.5, 154, 6.5, tocolor ( 0, 0, 0, 255 ), false)-- Exp Bar dxDrawRectangle(sWidth-183,sHeight-185,ExpBar,3.5,tocolor(255,255,255,255) ,false) -- Exp end ) ...Sry my bad English...
-
Hi Guys. I have a problem. Screen comes in 5 minutes. But not close. Where is my mistake? local sWidth, sHeight = guiGetScreenSize() local show = false local tick = getTickCount ( ) local endTick = nil addEventHandler("onClientRender", root, function ( ) if ( getTickCount ( ) - tick >= 300000 ) then show = true endTick = getTickCount ( ) + 30000 if ( getTickCount ( ) >= endTick ) then show = false tick = getTickCount ( ) end end if ( show ) then dxDrawImage((sWidth/2)-250, sHeight-sHeight-15, 160, 140, "images/HubbubGames.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage((sWidth/2)+90, sHeight-sHeight-15, 160, 140, "images/HubbubGames.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawLine((sWidth/2+120), sHeight-sHeight+65, (sWidth/2-120), sHeight-sHeight+65, tocolor(255, 255, 255, 255), 1, false) dxDrawText("Welcome To", (sWidth/2), 0, (sWidth/2), 31, tocolor(255, 255, 255, 255),1.00, "bankgothic", "center", "top", false, false, false) dxDrawText("Hubbub Games", (sWidth/2), 31, (sWidth/2), 62, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, false) dxDrawText("New Forum Adress:", (sWidth/2), 72, (sWidth/2), 89, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false) dxDrawText("www.HubbubGames.com", (sWidth/2), 89, (sWidth/2), 106, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false) end end )
-
It's solved. Thank you all.
-
dxDrawRectangle(sWidth-185,sHeight-128.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Armor Bar dxDrawRectangle(sWidth-183,sHeight-127,lineaarmor,3.5,tocolor(255,255,255,200) ,false) --Armor --dxDrawText(tostring(math.floor(armor+0.1)), sWidth-135, sHeight-128.5, sWidth, sHeight, tocolor(200, 200, 200, 255), 0.5, "bankgothic") -- Armor Yazı Armor is 0, do not appear. Like this; if isElementInWater(localPlayer) then dxDrawRectangle(sWidth-185,sHeight-120.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Oxygen Bar dxDrawRectangle(sWidth-183,sHeight-119, OxygenBar,3.5,tocolor(0,200,255,250) ,false) -- Oxygen end --This is breath