
yoya99
Members-
Posts
271 -
Joined
-
Last visited
Everything posted by yoya99
-
hello i have this countdown resource and i want it to make a text at the players screen like playername... starts the countdown ... 3 ,2,1 GO ! or something thx time = {} function Countdown (player, cmd) if isTimer(time[player]) then return end time[player] = setTimer(function() time[player] = nil end,30000,1) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) outputChatBox ( "" .. name .. ": #FF9600 Starts the Countdown !", getRootElement(), r, g, b, true ) outputChatBox ( "#FF0000 ===3===", getRootElement(), 255, 255, 255, true ) triggerClientEvent("triggerclientforGridCountdown", getRootElement()) setTimer ( Countdown5, 1000, 1 ) end function Countdown5 ( root ) outputChatBox ( "#FF0000 ===2===", getRootElement(), 255, 255, 255, true ) setTimer ( Countdown4, 1000, 1 ) end function Countdown4 ( root ) outputChatBox ( "#FF0000 ===1===", getRootElement(), 255, 255, 255, true ) setTimer ( Countdown3, 1000, 1 ) end function Countdown3 ( root ) outputChatBox ( "#FF0000 Go Go Go!!!", getRootElement(), 255, 255, 255, true ) setTimer ( Countdown2, 1000, 1 ) end addCommandHandler( "countdown", Countdown ) function somethingfor() if getTickCount() - getTickStart > 0 and count == 0 then sound3 = playSound( "3.mp3", false ) setSoundMaxDistance( sound3, 5000 ) count = 1 elseif getTickCount() - getTickStart > 1000 and count == 1 then if sound3 and isElement(sound3) then stopSound( sound3 ) end sound2 = playSound( "2.mp3", false ) setSoundMaxDistance( sound2, 5000 ) count = 2 elseif getTickCount() - getTickStart > 2000 and count == 2 then if sound2 and isElement(sound2) then stopSound( sound2 ) end sound1 = playSound( "1.mp3", false ) setSoundMaxDistance( sound1, 5000 ) count = 3 elseif getTickCount() - getTickStart > 3000 and count == 3 then if sound1 and isElement(sound1) then stopSound( sound1 ) end sound0 = playSound( "0.mp3", false ) setSoundMaxDistance( sound0, 5000 ) count = 4 elseif getTickCount() - getTickStart > 4000 and count == 4 then count = 5 if sound0 and isElement(sound0) then stopSound( sound0 ) end removeEventHandler( "onClientRender", getRootElement(), somethingfor) end end function GridCountdown() count = 0 getTickStart = getTickCount () addEventHandler( "onClientRender", getRootElement(), somethingfor) end addEvent ( "triggerclientforGridCountdown", true ) addEventHandler ( "triggerclientforGridCountdown", getRootElement(), GridCountdown )
-
sry not working:( client lua : 9 bad argument dxdrawtext expected number at argument 2 got nil
-
hello i have this countdown resource and i want it to make a text at the players screen like playername... starts the countdown ... 3 ,2,1 GO ! or something thx server: time = {} function Countdown (player, cmd) if isTimer(time[player]) then return end time[player] = setTimer(function() time[player] = nil end,30000,1) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) outputChatBox ( "" .. name .. ": #FF9600 Starts the Countdown !", getRootElement(), r, g, b, true ) outputChatBox ( "#FF0000 ===3===", getRootElement(), 255, 255, 255, true ) triggerClientEvent("triggerclientforGridCountdown", getRootElement()) setTimer ( Countdown5, 1000, 1 ) end function Countdown5 ( root ) outputChatBox ( "#FF0000 ===2===", getRootElement(), 255, 255, 255, true ) setTimer ( Countdown4, 1000, 1 ) end function Countdown4 ( root ) outputChatBox ( "#FF0000 ===1===", getRootElement(), 255, 255, 255, true ) setTimer ( Countdown3, 1000, 1 ) end function Countdown3 ( root ) outputChatBox ( "#FF0000 Go Go Go!!!", getRootElement(), 255, 255, 255, true ) setTimer ( Countdown2, 1000, 1 ) end addCommandHandler( "countdown", Countdown ) client: function somethingfor() if getTickCount() - getTickStart > 0 and count == 0 then sound3 = playSound( "3.mp3", false ) setSoundMaxDistance( sound3, 5000 ) count = 1 elseif getTickCount() - getTickStart > 1000 and count == 1 then if sound3 and isElement(sound3) then stopSound( sound3 ) end sound2 = playSound( "2.mp3", false ) setSoundMaxDistance( sound2, 5000 ) count = 2 elseif getTickCount() - getTickStart > 2000 and count == 2 then if sound2 and isElement(sound2) then stopSound( sound2 ) end sound1 = playSound( "1.mp3", false ) setSoundMaxDistance( sound1, 5000 ) count = 3 elseif getTickCount() - getTickStart > 3000 and count == 3 then if sound1 and isElement(sound1) then stopSound( sound1 ) end sound0 = playSound( "0.mp3", false ) setSoundMaxDistance( sound0, 5000 ) count = 4 elseif getTickCount() - getTickStart > 4000 and count == 4 then count = 5 if sound0 and isElement(sound0) then stopSound( sound0 ) end removeEventHandler( "onClientRender", getRootElement(), somethingfor) end end function GridCountdown() count = 0 getTickStart = getTickCount () addEventHandler( "onClientRender", getRootElement(), somethingfor) end addEvent ( "triggerclientforGridCountdown", true ) addEventHandler ( "triggerclientforGridCountdown", getRootElement(), GridCountdown )
-
Where? Shit i am too dumb for that
-
like that? LINE NUMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL local sx, sy = guiGetScreenSize ( ) local y = sy + 20 function onLevelup() dxDrawRectangle(sx*(707/1024), sy*(425/768), sx*(115/1024), sy*(27/768), tocolor(44, 44, 44, 221), true) dxDrawText("Rank up+", sx*(716/1024), sy*(429/768), sx*(808/1024), sy*(448/768), tocolor(0, 255, 0, 221), 0.70, "bankgothic", "left", "top", false, false, true, false, false) end function onwin( ) if ( y > ( sy / 2 ) ) then y = y - 2 elseif ( y < ( sy / 2 ) ) then y = ( sy / 2 ) end dxDrawText ( "+"..tostring(experience).." XP", 550, y, sx, 40, tocolor(255, 255, 255, 255), 0.8, "bankgothic") end addEvent("onwin", true) addEventHandler( "onwin", root, function(expe) if not isTimer(expTimer) then expTimer = setTimer(function() removeEventHandler("onClientRender", root, onTestExp) end, 2000, 1) experience = expe addEventHandler("onClientRender", root, win) else experience = (experience + expe) resetTimer(expTimer) end end)
-
have this xp system from castillo and i want to add a text 1. when a player levels up and 2. when a player gets xp . It should be e.g : +2 XP on the left side or like + Level up on the right side here is the code:(a part) LINE NUMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL function win(ammo, killer, weapon, bodypart) if (killer and getElementType(killer) == "player" and killer ~= source) then local H = getElementData(killer, "XP") or 5 local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) local X = 1 setElementData(killer, "XP", tonumber(H)+X) local H = tonumber(H) + X if tonumber(H) == 2 then setElementData(killer, "Level", "Level 1 Reach:10 XP") elseif tonumber(H) == 5 then setElementData(killer, "Level", "Level 2 Reach:15 XP") elseif tonumber(H) == 10 then setElementData(killer, "Level", "Level 3 Reach:25 XP") and here is the code where the dxdrawtext should be added then (i guess) : LINE NUMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL function getXP ( _, playerName ) if ( playerName ) then local thePlayer = getPlayerFromParticalName ( playerName ) if ( thePlayer ) then local Level = getElementData(thePlayer,"Level") or 0 local XP = getElementData(thePlayer,"XP") or 0 outputChatBox ( getPlayerName ( thePlayer ) .." XP ".. tostring ( XP ) .." LV: ".. tostring ( Level ) .." " ,155,211,216) else outputChatBox ( "Couldn't find '" .. playerName .. "'", source ) end end end addCommandHandler ( "getxp", getXP ) addCommandHandler ( "getXP", getXP ) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end thx in advance
-
I need help in a nametag img system and in a lvl system images...i will explain when i wth pc ok and its late ...see you tomorow
-
Samler i am interested too
-
I am searching for a paid scripter who has facebook/skype ... I am Looking for some who have experience with lvl system or dxdraw and so on....just write down here or for More information too.....
-
I am searching for a paid scripter who has facebook/skype ... I am Looking for some who have experience with lvl system or dxdraw and so on....just write down here or for More information too.....
-
Where to place/replace that part???
-
Hey there i am looking for a good level system with bankgothic text(ok) and with hud (including xp: and LV:) and with an image for every level or second level)......Also a text should be drawn when killing someone how much xp you got or when you level up there shuold be something like +Rank up drawn....if somone can share it with me pls write down below here thx in advance
-
ok any ideas with the topic xp little help ? no error in debug
-
HOW CAN I MAKE IT SHON THE IMAGES FROM OTHER PLAYERS TOOß NOT ONLY MINE:::: local sx,sy = guiGetScreenSize() function showImage() if getElementData(getLocalPlayer(), "showImage") then dxDrawImage((sx-190)/2, (sy-200)/2, 25, 25, "classicon_player.png" ) else dxDrawImage((sx-190)/2, (sy-200)/2, 25, 25, "classicon_vip.png" ) end end addEventHandler("onClientRender", root, showImage) function setDataOnLogin() if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount( source )),aclGetGroup ( "Admin" )) then setElementData(source, "showImage", true) end end addEventHandler("onPlayerLogin", root, setDataOnLogin) function setDataOnResourceStart() for i, v in ipairs(getElementsByType("player")) do if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount ( v )), aclGetGroup ( "Admin" )) then setElementData(v, "showImage", true) end end end addEventHandler("onResourceStart", resourceRoot, setDataOnResourceStart) function removeDataOnLogout() setElementData(source, "showImage", false) end addEventHandler("onPlayerLogout", root, removeDataOnLogout)
-
replace ?? aND WHAT IS WITH ELSE?
-
left of the palyers head yes.....but i want to show the images from other players too.....so i wantto show my own and the images from others
-
another question how can i make it be shown not only my own also the images of the other players.....hellpppp pls i used that code here: local sx,sy = guiGetScreenSize() function showImage() if getElementData(getLocalPlayer(), "showImage") then dxDrawImage((sx-190)/2, (sy-200)/2, 25, 25, "classicon_player.png" ) else dxDrawImage((sx-190)/2, (sy-200)/2, 25, 25, "classicon_vip.png" ) end end addEventHandler("onClientRender", root, showImage) function setDataOnLogin() if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount( source )),aclGetGroup ( "Admin" )) then setElementData(source, "showImage", true) end end addEventHandler("onPlayerLogin", root, setDataOnLogin) function setDataOnResourceStart() for i, v in ipairs(getElementsByType("player")) do if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount ( v )), aclGetGroup ( "Admin" )) then setElementData(v, "showImage", true) end end end addEventHandler("onResourceStart", resourceRoot, setDataOnResourceStart) function removeDataOnLogout() setElementData(source, "showImage", false) end addEventHandler("onPlayerLogout", root, removeDataOnLogout)
-
nothing in debugscript .... help pls
-
thx guys its fixed.... pls see my other question here : viewtopic.php?f=91&t=81481 itswith dxdraw
-
now i dont see any image...its like my old problem was .... i guess the last codes were ok but it drawed me an image even if i werent admin
-
so what i have to add that it only shows the image admins?