-
Posts
231 -
Joined
-
Last visited
Everything posted by boro
-
i dont know name, it's not my script, i want only disable panel in f1, but if isn't any way for disable it so Nothing doing.
-
Hm i try it but it still dont work function dontshowpanel( player ) unbindKey ( player, "F1", "down", dontshowpanel ) end function playerSpawn ( ) bindKey ( source, "F1", "down", dontshowpanel ) end addEventHandler ( "onPlayerSpawn", getRootElement(), playerSpawn )
-
Hi all i have compiled script and this script have some bind keys. Is any way to cancel bindKey ? I try this but it dont work, panel is still showed.. function cancelbind ( player, key, keyState ) cancelEvent () end bindKey ( player, "f1", "down", cancelbind )
-
is any easy way for create reload skin every 2 second. ? like this? server function reloadskin () triggerClientEvent ( "reloadskin", getRootElement() ) setTimer ( reloadskinjedna, 2000, 1 ) end setTimer ( reloadskin, 2000, 1 ) function reloadskinjedna () triggerClientEvent ( "reloadskinjedna", getRootElement() ) setTimer ( reloadskindva, 2000, 1 ) end function reloadskindva () triggerClientEvent ( "reloadskindva", getRootElement() ) setTimer ( reloadskintri, 2000, 1 ) end function reloadskintri () triggerClientEvent ( "reloadskintri", getRootElement() ) setTimer ( reloadskin, 2000, 1 ) end client function reloadskinhandler ( ) txdaa = engineLoadTXD ( "models/Francis/francis.txd" ) engineImportTXD (txdaa, 128) engineImportTXD (txdaa, 126) engineImportTXD (txdaa, 71) dffaa = engineLoadDFF ( "models/Francis/francis.dff", 128) dffaa = engineLoadDFF ( "models/Francis/francis.dff", 126) dffaa = engineLoadDFF ( "models/Francis/francis.dff", 71) engineReplaceModel ( dffaa, 128) engineReplaceModel ( dffaa, 126) engineReplaceModel ( dffaa, 71) end addEvent( "reloadskin", true ) addEventHandler( "reloadskin", getRootElement(), reloadskinhandler ) function reloadskinhandlerdva ( ) txdbb = engineLoadTXD ( "models/Zoey/zoey.txd" ) engineImportTXD (txdbb, 128) engineImportTXD (txdbb, 126) engineImportTXD (txdbb, 71) dffbb = engineLoadDFF ( "models/Zoey/zoey.dff", 128) dffbb = engineLoadDFF ( "models/Zoey/zoey.dff", 126) dffbb = engineLoadDFF ( "models/Zoey/zoey.dff", 71) engineReplaceModel ( dffbb, 128) engineReplaceModel ( dffbb, 126) engineReplaceModel ( dffbb, 71) end addEvent( "reloadskinjedna", true ) addEventHandler( "reloadskinjedna", getRootElement(), reloadskinhandlerdva ) function reloadskinhandlertri ( ) txdcc = engineLoadTXD ( "models/Bill/Bill.txd" ) engineImportTXD (txdcc, 128) engineImportTXD (txdcc, 126) engineImportTXD (txdcc, 71) dffcc = engineLoadDFF ( "models/Bill/Bill.dff", 128) dffcc = engineLoadDFF ( "models/Bill/Bill.dff", 126) dffcc = engineLoadDFF ( "models/Bill/Bill.dff", 71) engineReplaceModel ( dffcc, 128) engineReplaceModel ( dffcc, 126) engineReplaceModel ( dffcc, 71) end addEvent( "reloadskindva", true ) addEventHandler( "reloadskindva", getRootElement(), reloadskinhandlertri ) function reloadskinhandlerctyri ( ) txddd = engineLoadTXD ( "models/Ellie/Ellis.txd" ) engineImportTXD (txddd, 128) engineImportTXD (txddd, 126) engineImportTXD (txddd, 71) dffdd = engineLoadDFF ( "models/Ellie/Ellis.dff", 128) dffdd = engineLoadDFF ( "models/Ellie/Ellis.dff", 126) dffdd = engineLoadDFF ( "models/Ellie/Ellis.dff", 71) engineReplaceModel ( dffdd, 128) engineReplaceModel ( dffdd, 126) engineReplaceModel ( dffdd, 71) end addEvent( "reloadskintri", true ) addEventHandler( "reloadskintri", getRootElement(), reloadskinhandlerctyri ) and is this way lagged ?
-
Hm i try it but this still show only image 8 in all % function healthimages() sWidth, sHeight = guiGetScreenSize() local heal = getElementHealth(getLocalPlayer()) if heal >= 88 and 100 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/0.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal >= 87 and 75 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/1.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal >= 74 and 62 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/2.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal >= 61 and 49 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/3.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal >= 48 and 36 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/4.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal >= 35 and 23 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/5.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal >= 22 and 10 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/6.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal >= 9 and 6 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/7.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal >= 5 and 1 <= heal then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/8.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end end addEventHandler("onClientRender", getRootElement(), healthimages)
-
Hi , i make script for show health images but this script still show only image number 8 why ? what is bad? please help ty.. function healthimages() sWidth, sHeight = guiGetScreenSize() local heal = getElementHealth(getLocalPlayer()) if heal == 88 or 89 or 90 or 91 or 92 or 93 or 94 or 95 or 96 or 97 or 98 or 99 or 100 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/0.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal == 75 or 76 or 77 or 78 or 79 or 80 or 81 or 82 or 83 or 84 or 85 or 86 or 87 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/1.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal == 62 or 63 or 64 or 65 or 66 or 67 or 68 or 69 or 70 or 71 or 72 or 73 or 74 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/2.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal == 49 or 50 or 51 or 52 or 53 or 54 or 55 or 56 or 57 or 58 or 59 or 60 or 61 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/3.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal == 36 or 37 or 38 or 39 or 40 or 41 or 42 or 43 or 44 or 45 or 46 or 47 or 48 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/4.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal == 23 or 24 or 25 or 46 or 27 or 28 or 29 or 30 or 31 or 32 or 33 or 34 or 35 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/5.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal == 10 or 11 or 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19 or 20 or 21 or 22 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/6.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal == 6 or 7 or 8 or 9 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/7.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if heal == 1 or 2 or 3 or 4 or 5 then dxDrawImage( (600.0/800)*sWidth, (175.0/600)*sHeight, (104.0/800)*sWidth, (54.0/600)*sHeight,"hud/images/8.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end end addEventHandler("onClientRender", getRootElement(), healthimages)
-
Hi i have stamina script, it work good but when i am killed and then respawned then timers dont are killed why? i have set killtimer for ( checktimer ). ty for help stamina = 100 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 100 if isTimer( checktimer ) then killTimer ( checktimer ) else local checktimer = setTimer(checkKeyone,1000,0) -- this timer dont are killed end end) function checkKeyone() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then stamina = stamina -1 end if ( stamina == 0 ) then local updatetimer = setTimer(updateStamina,10000,1) setControlState( "sprint", false ) end end function updateStamina() if stamina == 0 and getControlState ( "sprint" ) == false then stamina = stamina +100 if isTimer( updatetimer ) then killTimer ( updatetimer ) end end end
-
Hi i have script for show health, this script work good but in debug is showing WARNING: play/hud/hudc.lua:266: Bad argument @ 'DxDrawRectangle' [Expected number at argument 3, got nill] what is bad, please help ty. this is script function DXdraw2() sWidth,sHeight = guiGetScreenSize() for i, player in ipairs(getElementsByType("player")) do local team = getPlayerTeam(player) if team and getTeamName(team) == "Team1" then for i, player in ipairs(getPlayersInTeam(team)) do sWidth, sHeight = guiGetScreenSize() local healtha = getElementHealth(player) lineLength1 = 192* ( healtha / 100 ) ticka = getTickCount () local maxHealtha = 100; local colourPercent = ( healtha / maxHealtha ) * 200; local red, green; if healtha < ( maxHealtha / 2 ) then red = 88; green = ( healtha / 50 ) * ( colourPercent * 2 ); else green = 154; red = 88 - ( ( healtha - 50 ) / 50 ) * 88; end end end end local color1 = tocolor( 88, 154, 24, 100 ) local color2 = tocolor( 88, 154, 24, 200 ) dxDrawRectangle(sWidth-785,sHeight-39,192.0,25.0,color1, false) dxDrawRectangle(sWidth-785,sHeight-39,lineLength1,25.0,color2,false) -- THIS IS LINE 266 end
-
Hi i have script for disable sprint and i try make outputchatbox forinfo stamina level but this show only chek vhat is bad ? stamina = 10 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 10 setTimer(checkKey,700,0) setTimer(updateStamina,1000,0) outputChatBox ( "Stamina start", getLocalPlayer(), 255, 255, 255, true ) end) function checkKey() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then local check = stamina stamina = stamina -1 outputChatBox ( " ..check.. " % stamina ", getLocalPlayer(), 255, 255, 255, true ) end if ( stamina == 0 ) then setControlState( "sprint", false ) end end function updateStamina() if stamina ~= 10 and getControlState ( "sprint" ) == false then stamina = stamina +1 end end
-
Hi i make dxdravrectangle bar for team but this dont work why? please help me function showteamhealth ( ) local team = getTeamFromName ( Team1 ) for i, player in ipairs(getPlayersInTeam(team)) do local sWidth,sHeight = guiGetScreenSize() local Width = sWidth-400 local health = health + getElementHealth(player) local HealthBar = sWidth*( -health / Width ) dxDrawRectangle(sWidth*0.79,sHeight*0.072,HealthBar,sHeight*0.03,tocolor(255,0,0,250) ,false) end end addEventHandler("onClientRender", getRootElement(), showteamhealth)
-
it dont work because i used compiled script from comunity and this script contain fadeCamera ( true, 1.0, 0, 0, 0 ) when is player spawned,, but i need fadeCamera ( false, 1.0, 0, 0, 0 ) when is player spawned and this work only with onClientRender funtion
-
Ok this is bad idea dut when i hange this script to function testFunction () if fadeCamera ( false, 1.0, 0, 0, 0 ) then else fadeCamera ( false, 1.0, 0, 0, 0 ) end end addEventHandler ( "onClientRender", root, testFunction ) its good for good server? or is it laged function for server ?
-
Yes This page has helped me alot TY Man Resolved
-
Please help console show me this ERROR: [gamemodes]\[glory]\glory\modes\glory.lua:29: wrong number of arguments this is 29 line spawnPlayer(source,posX,posY,posZ,rotZ,math.random(1,2,7,14),interior,0,snipers)
-
Still dont work message dont are showed function showteamhealth ( command, snipers ) Snipers = "Snipers" local steam = getTeamFromName ( Snipers ) if ( steam ) then for i, player in ipairs(getPlayersInTeam(steam)) do health = health + getElementHealth(player) outputChatBox("Team Snipers have" .. health .. " %health", getRootElement(), 255, 255, 255, true) end end end addCommandHandler ( "snipers", showteamhealth )
-
Hi all i try make script for show team health but it dont work please help. function showteamhealth ( command, snipers ) local steam = getTeamFromName ( Snipers ) if ( steam ) then for i, player in ipairs(getPlayersInTeam(steam)) do health = health + getElementHealth(player) outputChatBox("Team Snipers have" .. health .. " %health", getRootElement(), 255, 255, 255, true) end end end addCommandHandler ( "snipers", showteamhealth )
-
Ok now show it this [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 1 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 30 [2014-08-03 20:54:21] INFO: s.ammo data: 270 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0 [2014-08-03 20:54:21] INFO: s.weap data: 0 [2014-08-03 20:54:21] INFO: s.ammo data: 0
-
i test it with this addEventHandler("onPlayerLogout",root,function(prev) onPlayerQuit(source, prev) end) and onPlayerLogout work fine but onPlayerQuit dont work