
Resto
Members-
Posts
155 -
Joined
-
Last visited
Everything posted by Resto
-
and what i must use when i want to weapons? if ( getPedWeapon ( player ) ) then guiSetText ( aTab1.Weapon, "Weapon: "..getWeaponNameFromID ( getPedWeapon ( player ) ).." (ID: "..getPedWeapon ( player )..")" ) end
-
local 70 = Good Skin local 71 = Nice Skin i want when i have skin ID 70 or 71 there will not Skin: 70 & 71 but Skin: Good Skin
-
hi i have here this: Skin: ID guiSetText ( aTab1.Skin, "Skin: "..iif ( getElementModel ( player ), getElementModel ( player ), "N/A" ) ) and when i want to if getPlayerSkin ( 70 ) == Good Skin elseif getPlayerSkin ( 100 ) == Noob Skin elseif getPlayerSkin ( 50 ) == Idiot Skin Good Skin = Name Noob Skin = Name Idiot Skin = Name example: ID 0 = CJ == Good Skin Skin: Good Skin Please can anyone help me or get me example ?
-
When i set points to 50000000 = 50,000,000 i dont see full text why?
-
WARNING: test\test.lua:16: Bad argument @ "guiSetAlpha" [Expected number at argument 2, got boolean]
-
Can anyone fix this please? i dont know why not work show/hide with F4.. GUIEditor = { gridlist = {}, label = {} } GUIEditor.gridlist[1] = guiCreateGridList(0.31, 0.00, 0.35, 0.0350, true) guiSetAlpha ( GUIEditor.gridlist[1], 0.87 ) GUIEditor.label[1] = guiCreateLabel(0.36, 0.00, 0.28, 0.75, "Points", true, GUIEditor.gridlist[1]) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") function showPointsMonitor () local Alpha = guiGetAlpha(GUIEditor.girdlist) guiSetAlpha(GUIEditor.girdlist,not aplha) end bindKey("F4","down",showPointsMonitor) function points () local points = getPlayerMoney ( player ) guiSetText ( GUIEditor.label[1], "Points: "..points.."" ) end addEventHandler ( "onClientRender", getRootElement(), points ) WARNING: test\test.lua:15: Bad argument @ "guiSetAplha" [Expected gui-element at argument 1, got nil] WARNING: test\test.lua:16: Bad argument @ "guiSetAplha" [Expected gui-element at argument 1, got nil]
-
Anyone can help me with this last codes?
-
I add this: addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", root, function ( theKiller ) exports.exp_system:addPlayerEXP ( theKiller, 1 ) end ) But experience here not added: local sx, sy = guiGetScreenSize() function drawExperience() dxDrawRectangle((310/1024)*sx,(698/768)*sy,(481/1024)*sx,(36/768)*sy,tocolor(0,0,0,125),false) dxDrawRectangle((315/1024)*sx,(703/768)*sy,(472/1024)*sx,(26/768)*sy,tocolor(255,0,0,55),false) local experience = getElementData(localPlayer,"experience") or 0 local experience_n = getElementData(localPlayer,"experience_n") or 0 local level = getElementData(localPlayer,"LeveL") or 1 local percent = (experience / experience_n * 100) if (percent >= 100) then percent = 100 elseif (experience_n < 1) then percent = 0 end dxDrawRectangle((320/1024)*sx,(706/768)*sy,(tonumber(percent)*4.64/1024)*sx,(20/768)*sy,tocolor(0,0,0,75),false) dxDrawBorderedText("LeveL: ".. tostring(level) .." | Experience Points: ".. tostring(experience) .." > ".. tostring(experience_n),(430/1024)*sx,(707/768)*sy,(667/1024)*sx,(724/768)*sy,tocolor(255,0,0,255),(sx/1024)*0.6,"bankgothic","center","center",false,false,false) end addEventHandler("onClientRender",root,drawExperience) function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end addEvent ( "LevelUpEffect", true ) addEventHandler ( "LevelUpEffect", root, function ( ) PlayerLevelUpSound() addEventHandler("onClientRender",root,DrawLevelUp) setTimer(function() removeEventHandler("onClientRender",root,DrawLevelUp) end, 4000, 1) end ) function PlayerLevelUpSound() local sound = playSound("levelup.mp3") setSoundVolume(sound, 1) end function DrawLevelUp() dxDrawBorderedText( "[!] LEVEL UP [!]", sx/2, sy/15, sx/2, sx/2, tocolor(255,144,0,255),(sx/1024)*2.5,"bankgothic","center","center",false,false,false ) end And i had 283 zombie kills and when i go reconnect or join later i have always 283: function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if not zombieKills then setAccountData(account,"Zombie kills",0) end setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if zombieKills then setElementData(source,"Zombie kills",tostring(zombieKills)) else setElementData(source,"Zombie kills",0) end end)
-
but there is from [5] to [6] and reward money i dont want..
-
And this why not work? i want only updates exports.scoreboard:addScoreboardColumn('Level') function updateStats(plr) local acc = getPlayerAccount(plr) local accName = getAccountName(acc) local zKills = getAccountData(acc, "Zombie Kills") or 0 if zKills >= 0 and zKills <= 5 then setAccountData(acc, "Level", 1) elseif zKills >= 5 and zKills <= 10 then setAccountData(acc, "Level", 2) end end function getAllPlayers() local players = getElementsByType("player") for k, v in pairs(players) do updateStats(v) end end setTimer(getAllPlayers, 5000, 0)
-
Can you help me create code? or where is this script?
-
Yes i mean this.. and this is where? this have 20 servers..
-
I insulting to me i am idiot in this your link.. i see only "congratulation your level is 4! but i dont see this: Level: Example 4 Experience: 200 > 500 <-- this not work
-
I am with this idiot i add in my server and add in acl.xml and not work..
-
this? And i set my Zombie Kills this: i stopped server delete script start server add script. Please get me this script install? --> https://community.multitheftauto.com/index.php?p=resources&s=details&id=1253 function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if not zombieKills then setAccountData(account,"Zombie kills",0) end setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if zombieKills then setElementData(source,"Zombie kills",tostring(zombieKills)) else setElementData(source,"Zombie kills",0) end end)
-
What? you mean in scoreboard "Zombie Kills" ?
-
not work .. can you help me how to install to your exp_system? its good this is shit..
-
exports.scoreboard:addScoreboardColumn('Level') levelCache = {} function updateStats(plr) local acc = getPlayerAccount(plr) local accName = getAccountName(acc) local zKills = getAccountData(acc, "Zombie Kills") or 0 if zKills => 0 and zKills < 50 then setAccountData(acc, "Level", 1) elseif zKills => 50 and zKills < 150 then setAccountData(acc, "Level", 2) end local lvl = getAccountData(acc, "Level") or 1 if lvl > levelCache[accName] then outputChatBox(getPlayerName(plr).." leveled up from "..levelCache[accName].." to "..lvl) givePlayerMoney(plr, 2000) -- Give money on level up. end levelCache[accName] = lvl end function getAllPlayers() local players = getElementsByType("player") for k, v in pairs(players) do updateStats(v) end end setTimer(getAllPlayers, 5000, 0)
-
ERROR: [gameplay]/test/test.lua:15: attempt to concatenate field "?" (a nil value) But i want only this please: outputChatBox(getPlayerName(plr).." leveled up to "..lvl)