Search the Community
Showing results for tags 'teamcolor'.
-
function create() FO = createTeam ( "Forever", 255, 0, 0 ) AV = createTeam ( "Avalanche", 255, 255, 255 ) GH = createTeam ( "Ghost", 255, 123, 0 ) end function addplayer(player, cmd, target, clan) local recipient = getPlayerFromName(target) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( clan ) ) then outputChatBox("* " .. recipientName .. " is already in your clan" , player, 255, 0, 0, true) else if recipient then local r, g, b local recipientName = getPlayerName(recipient) local playerName = getPlayerName(player) outputChatBox("*" .. recipientName .. " #FFFFFF has been added #FF0000" .. clan .. "#FFFFFF clan" , player, 255, 0, 0, true) outputChatBox("*" .. playerName .. " #FFFFFF added you to #FF0000" .. clan .. "#FFFFFF Clan", recipient, 255, 0, 0, true) setPlayerTeam ( recipient, clan ) r, g, b = getTeamColor (clan) setPlayerNametagColor ( recipient, r, g, b ) aclGroupAddObject (aclGetGroup(clan), "user."..accName) else outputChatBox("Sorry, we got 0 matches to the name" .. recipientName, player, 255, 0, 0) end end end function kickplayer(player, cmd, target, clan) local recipient = getPlayerFromName(target) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name local r,g,b if isObjectInACLGroup ("user."..accName, aclGetGroup ( clan ) ) then setPlayerTeam ( recipient, nil ) setPlayerNametagColor ( recipient, 225, 225, 225 ) aclGroupRemoveObject (aclGetGroup(clan), "user."..accName) else outputChatBox("The Player is Not in" .. clan .. "Clan" .. clan, player, 255, 0, 0) end end addCommandHandler("add", addplayer) addCommandHandler("ckick", kickplayer) addEventHandler ( "onResourceStart", getRootElement(), create ) This is a Clan system that i am working on, and when i run the script i get 2 errors , one is from the "setPlayerTeam" and the other one is from "GetTeamcolor" First One is : @ 'setPlayerTeam' [ Expected team at argument 2, got string 'AV' ] Second one is : @ 'getTeamColor' [Expected team at argument, got string 'AV'] Pls help me out , ik what this means but havent found a way to fix this And since This forum has helped me a lot , i am asking here , And also i would like to know a way to make this script to be able to Run for people In Acl group FOL , AVL and GHL ( which are clan leaders ) Thanks in Advance
- 2 replies
-
- setplayerteam
- teamcolor
-
(and 1 more)
Tagged with: