• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved [8.54] Need help with lua script

Baneczek

うさちゃん
Joined
Nov 13, 2013
Messages
70
Reaction score
4
Location
Pila, Poland
Hello. I want to create a command that will change every online player group ID to group ID that i want to.
Let's say, i want everyone to have group ID 2, i will use /setgroup 2, for group 6, /setgroup 6 etc.

I wrote this script, but it doesn't set every online player group, but only mine.

Code:
function onSay(cid, words, param, channel)
local param = string.lower(param)

for _, cid in ipairs(getPlayersOnline()) do
setPlayerGroupId(cid, param)
        return TRUE
end

    if(param == "") then
        doPlayerSendCancel(cid,"You must say what group you want to set.")
        return TRUE
    end

  

end

Would be nice if there is someone that can help me with this script.
 
Back
Top