So basically i have this script, and its suppose to change a user from the "Guest" rank to the "Members" rank if they have "[Pd]" in their name.
The only issue i have is that anyone with [, ], P, D in they're name, will be moved to the members group.
Also if they dont have the tag it removes them from the group.
[CODE]function PLUGIN:PlayerInitialSpawn( ply )
local name = ply:Name()
local g = ply:EV_GetRank()
local sid = ply:SteamID()
if string.find( name, "[Pd]" ) and g == "guest" then
ply:EV_SetRank("respected")
end
if not string.find( name, "[Pd]" ) and g == "respected" then
ply:EV_SetRank("guest")
end
end[/CODE]
[lua]string.find( name, "[Pd]", 1, true )[/lua]
Sorry, you need to Log In to post a reply to this thread.