Name Length Restriction

From Soldat Community Wiki
Revision as of 17:47, 14 August 2012 by Freeman (talk | contribs) (Created page with "===Script by Spkka=== <source lang="pascal">//JOINTEAM procedure OnJoinTeam(ID, Team: byte); begin //kick player if nickname is above 24 characters if GetPlayerStat(ID, 'Ac...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Script by Spkka

//JOINTEAM
procedure OnJoinTeam(ID, Team: byte);
begin	
	//kick player if nickname is above 24 characters
	if GetPlayerStat(ID, 'Active' ) = true then
	begin
		if length(getPlayerStat( ID, 'name' )) > 24 then
		begin
			WriteConsole(ID,'...your name is over 24 characters, please change it.',$FFFF4444);
			KickPlayer(ID);
		end
	end
end;