yoya99 Posted October 17, 2014 Share Posted October 17, 2014 hey there i have a problem....i want if a players gets xp or levels up to get a little text like on the left side +2xp for example or for example +Rank up......i have tried so many times to do it but i failed....here is my exp resource : 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 i tried that here: (i would be proud if someone fixes it complete : 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) Link to comment
ZL|LuCaS Posted October 17, 2014 Share Posted October 17, 2014 hey there i have a problem....i want if a players gets xp or levels up to get a little text like on the left side +2xp for example or for example +Rank up......i have tried so many times to do it but i failed....here is my exp resource : 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 i tried that here: (i would be proud if someone fixes it complete : 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) It has a typo at line 26 and 9 ('onwin' and 'win). Link to comment
yoya99 Posted October 17, 2014 Author Share Posted October 17, 2014 Doesnt work too anyone? Link to comment
xeon17 Posted October 17, 2014 Share Posted October 17, 2014 You are creating the same topic every day. Link to comment
yoya99 Posted October 17, 2014 Author Share Posted October 17, 2014 You dont answer me pls correct the code here Link to comment
xeon17 Posted October 17, 2014 Share Posted October 17, 2014 You dont answer me pls correct the code here No, learn scripting Link to comment
xeon17 Posted October 18, 2014 Share Posted October 18, 2014 He don't know scripting , he is only posting stolen or leaken scripts to let us fix for him. Link to comment
yoya99 Posted October 18, 2014 Author Share Posted October 18, 2014 that scripts are not stolen ...if you wuopld see that script is open community exp system from castillo ! so Fck you Link to comment
xeon17 Posted October 18, 2014 Share Posted October 18, 2014 that scripts are not stolen ...if you wuopld see that script is open community exp system from castillo ! so Fck you The exp_system of Castilo is complied , btw check this https://forum.multitheftauto.com/viewtopic.php?f ... 46#p743346 Link to comment
yoya99 Posted October 18, 2014 Author Share Posted October 18, 2014 that scripts are not stolen ...if you wuopld see that script is open community exp system from castillo ! so Fck you The exp_system of Castilo is complied , btw check this https://forum.multitheftauto.com/viewtopic.php?f ... 46#p743346 then check this too: https://wiki.multitheftauto.com/wiki/Re ... Exp_system Link to comment
yoya99 Posted October 18, 2014 Author Share Posted October 18, 2014 I have to ask you if you want to get reportet now ....moderators should lock this topic...by th way i heard that xean is a con-man...a fiddler Link to comment
Mr_Moose Posted October 18, 2014 Share Posted October 18, 2014 Documentations are made to make sure users don't have to ask, what info are you missing on that wiki page? If you still have to ask make sure it's relevant like if there is something that isn't clear enough in the documentation, also it's pretty stupid claiming it's your script if it isn't. Link to comment
yoya99 Posted October 18, 2014 Author Share Posted October 18, 2014 it is but its modefied how you can see.... Link to comment
Recommended Posts