I can't find any parse that makes a player switch team...
I would like to make a play spec, and when he try to change team to CT it will go back to Spec.
Anyway thats possible?
Thanks (:
- Anders4000
elseif string.sub(message, 1, 7)=="@lockt " then
tmpid=string.sub(message, 8)
if player(tmpid, "exists") then
locked[tmpid-1+1]=1
parse("maket "..tmpid)
msg(Color(255, 255, 255), player(id, "name").." LOCKED "..player(tmpid, "name").." TO THE T SIDE.")
return 1
else
msg2(id, Color(255, 0, 0), "Player does not exist!")
return 1
end
else
msg2(id, Color(255, 0, 0), "Access Denied!")
return 1
end
elseif string.sub(message, 1, 8)=="@lockct " then
tmpid=string.sub(message, 9)
if player(tmpid, "exists") then
locked[tmpid-1+1]=2
parse("makect "..tmpid)
msg(Color(255, 255, 255), player(id, "name").." LOCKED "..player(tmpid, "name").." TO THE CT SIDE.")
return 1
else
msg2(id, Color(255, 0, 0), "Player does not exist!")
return 1
end
else
msg2(id, Color(255, 0, 0), "Access Denied!")
return 1
end
elseif message=="@switch" then
for i=1,32 do
if player(i, "exists") then
if player(i, "team")==1 then
locked[i]=2
parse("makect "..i)
elseif player(i, "team")==2 then
locked[i]=1
parse("maket "..i)
end
end
end
msg(Color(255, 255, 255), player(id, "name").." SWITCHED sides.")
return 1
else
msg2(id, Color(255, 0, 0), "Access Denied!")
end
elseif string.sub(message, 1, 10)=="@lockspec " then
tmpid=string.sub(message, 11)
if player(tmpid, "exists") then
locked[tmpid-1+1]=3
parse("makespec "..tmpid)
msg(Color(255, 255, 255), player(id, "name").." LOCKED "..player(tmpid, "name").." TO THE SPEC SIDE.")
return 1
else
msg2(id, Color(255, 0, 0), "Player does not exist!")
return 1
end
end
end