Ir para conteúdo

/group Subwat,god


Subwat

Posts Recomendados

esse comando serve para você definir o Group de algum player,se caso você quizer promove-lo é simples e além de fazer isto ele Muda o nome do player por exemplo "Subwat" fica "GOD Subwat" ou tutor ou senior e etc.

 

Talkaction:

 

--[[ Set Group By Subwat]]--  
function onSay(cid, words, param)

local t = string.explode(param, ",")
local player = getPlayerByName(t[1])
local pid = getPlayerByNameWildcard(t[1])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")
return TRUE
end

local acess = {
["god"] = {acess = 6,Name = "[GOD] "..getCreatureName(player)..""},
["cm"] = {acess = 5,Name = "[CM] "..getCreatureName(player)..""},
["gm"] = {acess = 4,Name = "[GM] "..getCreatureName(player)..""},
["senior tutor"] = {acess = 3,Name = "[s Tutor] "..getCreatureName(player)..""},
["tutor"] = {acess = 2,Name = "[Tutor] "..getCreatureName(player)..""}
}

local e = acess[t[2]]
if not(e) then
return doPlayerSendTextMessage(cid, 22, "desculpe,digite god,cm,gm,senior tutor ou tutor !")
end
db.executeQuery("UPDATE `players` SET `name` = '"..e.Name.."' WHERE `id` = "..getPlayerGUID(player)..";")      
setPlayerGroupId(player, e.acess)    
doBroadcastMessage("Saudações ao Novo "..e.Name..".", MESSAGE_EVENT_ADVANCE)   
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)    
doPlayerSendTextMessage(player,25,"Você será kickado em 3 segundos.")              
addEvent(doRemoveCreature, 3*1000, player, true)  
return TRUE    
end 

 

<talkaction words="/group" access="5" script="group.lua"/>

 

 

 

 

 

Créditos:

Subwat

 

att

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...