Baneczek
うさちゃん
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.
Would be nice if there is someone that can help me with this script.
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.