Poli= createTeam ( "Policja", 0, 0, 255 )
function Policja (theplayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(theplayer)), aclGetGroup("Policja")) then
setPlayerTeam ( theplayer, Poli )
setElementModel ( theplayer, 280 )
setElementPosition ( theplayer, 1595.6470947266,-1622.04772949228, 13.418748855591 )
setElementParent ( theplayer, Poli )
outputChatBox("",thePlayer,0,255,0,true)
else
outputChatBox("",thePlayer,0,255,0,true)
end
end
addCommandHandler("loginpolicja",Policja)
------------------------------------------------------------------Lider--------------------------------------------------------------------------------------------------------
function Policjagive( player, commandName, nick,name,_)
local targetPlayer = getPlayerFromName(tostring(nick))
local hour, mins = getTime ()
if targetPlayer == false then
outputChatBox("Gracz nie jest pod??czony do serwera", player,255,0,0)
return
end
setElementData(targetPlayer, "Lider", true)
outputChatBox("Gracz " .. nick .. " otrzyma? Lidera", player,0,0,255)
outputChatBox ( "Nadano Lidera Policji graczowi " .. nick .. " o godz:" .. hour .. ":" .. mins,player,0,0,255)
end
addCommandHandler("dajliderapol",Policjagive)
|