1LoL1
-
Posts
944 -
Joined
-
Last visited
Posts posted by 1LoL1
-
-
Hello, please can anyone help me how i can get more players with stats in gridlist? i always get only one player..
function stats (stat1, stat2, stat3) guiGridListClear(stattab) guiGridListAddRow(stattab) guiGridListSetItemText(stattab, 0, 1, stat1[1], false, false) guiGridListSetItemText(stattab, 0, 2, stat2[1], false, false) guiGridListSetItemText(stattab, 0, 3, stat3[1], false, false) end addEvent("stats", true) addEventHandler("stats", getRootElement(), stats) function stats2 () local stat1 = {} local stat2 = {} local stat3 = {} local result = dbQuery(database,"SELECT * FROM stats") local poll = dbPoll(result, -1) for i,v in ipairs(poll) do table.insert(stat1, v["stat1"]) table.insert(stat2, v["stat2"]) table.insert(stat3, v["stat3"]) end triggerClientEvent(source, "stats", source, stat1, stat2, stat3) end addEvent("stats2", true) addEventHandler("stats2", getRootElement(), stats2)
-
Hello, how i can takeWeapon when i deactivate nightvision? is there function for this or its not possible?
-
How i can show text in dxDrawText? i always get nil
local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", getRootElement(), function(text) local text2 = (getElementData(localPlayer, "text") or 0) if (text2 >= 0) and (text2 <= 3999) then text = 10 elseif (text2 >= 4000) and (text2 <= 5999) then text = 35 elseif (text2 >= 6000) and (text2 <= 10000000) then text = 70 end dxDrawText(text, screenW * 0.0638, screenH * 0.3317, screenW * 0.3200, screenH * 0.3550, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end)
-
2 hours ago, Tails said:
@1LoL1 cause getAccountPlayer expects an 'account' element but getAccount returns false cause it didn't find the account.
All you need to do is add a check, for example:
if account then -- continue here end
Next time you use a function check the wiki page for it, it explains exactly what it will return and what it returns in case there's a mistake. In your case it didn't find the account so it returned false.
Hope this helps.
ok this works thanks for help
function TST(player, command, accountName) local account = getAccount(accountName) if account then local player = getAccountPlayer(account) if player then
-
Unable to get account @ TST:account, got "boolean"
i used /tst noob and this error
example:
LOL = online
ShayF = offline/tst LOL work
/tst ShayF then nothing because account is not on on the server
-
my acc: LOL
if i use /tst LOL its working but when i use /tst LOL5666 etc.. i have warning..
function TST(player, command, accountName) local account = getAccount(accountName) local player = getAccountPlayer(account) if player then
Bad argument @ 'getAccountPlayer' [Expected account at argument 1, got boolean]
How to check account if exist? Please help me anyone
-
function check () local r,g,b if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Forever")) then setPlayerTeam(source, getTeamFromName("FO")) r, g, b = getTeamColor(getTeamFromName("FO")) setPlayerNametagColor(source, r, g, b) end end addEventHandler("onPlayerLogin", getRootElement(), check)
- 1
-
-
Good Job!
-
addEventHandler("onClientPlayerSpawn", getLocalPlayer(), function() setElementHealth(source, getElementHealth(source) - 99) end)
-
oh i don't think this i mean normal text
Example:
/sms 1 2 3 4 5
1 2 3 4 5
/sms 1\n2\n3\n4\n5
1
2
3
4
5
-
Hello, can anyone help me with this? i always must use /sms . text i need /sms text and why i can't use example: /sms text\ntext\ntext ?
server-side addCommandHandler("sms", function(player, cmd, sms, ...) newSMS = table.concat({...}, " ") sms = newSMS triggerClientEvent("onSMSTrigger", player, sms) end) client-side local screenW, screenH = guiGetScreenSize() local sms = "" addEvent("onSMSTrigger", true) addEventHandler("onSMSTrigger", getRootElement(), function (newSMS) sms = newSMS end) addEventHandler("onClientRender", getRootElement(), function() dxDrawText(sms, (screenW * 0.2462) + 1, (screenH * 0.6833) + 1, (screenW * 0.8838) + 1, (screenH * 0.9933) + 1, tocolor(0, 0, 0, 255), 2.50, "default-bold", "left", "top", true, true, false, true, false) dxDrawText(sms, screenW * 0.2462, screenH * 0.6833, screenW * 0.8838, screenH * 0.9933, tocolor(255, 255, 255, 255), 2.50, "default-bold", "left", "top", true, true, false, true, false) end)
-
use triggerEvent()
-
2 minutes ago, #,+( _xiRoc[K]; > said:
try like this :
function unconvertNumber ( number ) local result = number:gsub ( ',', '' ):gsub ( '%$', '' ); return tonumber ( result ); end
Thanks working.
-
Please can anyone help me with this? i don't know how to unconvertnumber with "$" when it's money = "5,000,000" working but with $ not working..
money = "5,000,000$" function unconvertNumber ( number ) local result = number:gsub ( ",", "" ); return tonumber ( result ); end outputChatBox(unconvertNumber(money))
-
function lalala () for i,v in ipairs (getElementsByType("player")) do outputChatBox(getPlayerName(v)) end end addCommandHandler("players", lalala)
here.. how i can delete my name? but others i will see.
Works thanks.
-
doesnt work.. its the same what i have..
-
Can anyone help me? it's possible delete my nick of this?
for i,v in ipairs (getElementsByType("player")) do guiGridListSetItemText(GUIEditor.gridlist[1], guiGridListAddRow(GUIEditor.gridlist[1]), 1, string.gsub(getPlayerName(v), "#%x%x%x%x%x%x", ""), false, true) end
-
Always when i login i see message Welcome Back! but when i login with new account i don't see message and i'am not spawned.. Can anyone help me please?
function lacc (_, acc) local account = getAccountName(acc) local result = dbQuery (database, "SELECT * FROM SERVER WHERE Account = ?", account) local poll, rows = dbPoll(result, -1) if rows == 1 then if getAccountData(acc, "NewUser") then spawnPlayer(source, x, y, z, 0, 0, 0, 0) outputChatBox("Welcome Back!") else spawnPlayer(source, x, y, z, 0, 0, 0, 0) setAccountData(acc, "NewUser", "NewUser") outputChatBox("Welcome (NewUser)") end end end addEventHandler("onPlayerLogin", getRootElement(), lacc)
-
Code?
-
lol. It's amazing!!!
- 1
-
On 20. 12. 2016 at 9:21 AM, koragg said:
Make the positions of everything look ok for YOUR resolution only (just numbers, no multiplications). Then post your code and say on what resolution you've made it. I'll take a look then and try to fix it for any screen.
Btw what's that "isMouseSetColor" thing? I can't find it on the wiki.
I think it's isMouseInPosition
-
2 hours ago, MKH said:
You mean ' Bots '
If yes, i think you can't
So you think bad. It's possible.
-
First you must add cars in DayZ then you can spawn vehicles and open inventory in car.
GridList
in Scripting
Posted
ok its solved