View Full Version : Questions about adding a few plugins
Buzzbrad
02-04-2012, 01:57
How would i make it so only certain people were able to change the colour of there text in chat to yellow or green etc.
How would i also make it so they had unusual or particle effects on there hats. I know its TF2 items but i dont know exactly how. Thanks!
Buzzbrad
02-04-2012, 20:07
Also im sort of new so try to explain the best you can.
How would i make it so only certain people were able to change the colour of there text in chat to yellow or green etc.
Well... I will explain it for HL2 DM
use this code
public OnPluginStart()
{
RegConsoleCmd("say", HandleSay);
}After that you have to get the message and the name...
public Action:HandleSay(Client, Args)
{
//Ist es die Konsole?
if(Client == 0)
{
//Wenn ja wird gestoppt
return Plugin_Continue;
}
//Deklarieren des Strings in den wir die Nachricht schreiben
decl String:Arg[255];
decl String:Argcheck[255];
//Deklarien des Teams
decl Teamnumber;
//Einspeichern der Nachricht und Festlegung der Zellen
GetCmdArgString(Arg, sizeof(Arg));
//Entfernen der Anführungszeichen und "whitespace characters"
StripQuotes(Arg);
TrimString(Arg);
if((SplitString(Arg,"!",Argcheck,1) == 1))
{
return Plugin_Handled;
}
if((SplitString(Arg,"/",Argcheck,1) == 1))
{
return Plugin_Handled;
}
//Team herrausfinden
Teamnumber = GetClientTeam(Client);
//Combine
if(Teamnumber == 2)
{
CPrintToChatAll("{olive}[RP]{blue}%N {default}: {green}%s",Client,Arg);
}
//Rebels
else if(Teamnumber == 3)
{
CPrintToChatAll("{olive}[RP]{red}%N {default}: {green}%s",Client,Arg);
}
//Andere Teams
else
{
CPrintToChatAll("{olive}[RP]{green}%N {default}: {green}%s",Client,Arg);
}
return Plugin_Handled;
}This just shows how to change it for all players of a team using colors.inc
http://forums.alliedmods.net/showthread.php?t=96831
U have to check a database(You have to make one) and see if the steamid is on it, instead of checking the team...
//Sorry that the comments are german... It's a part of a plugin i've made
Greez Gate
Buzzbrad
02-05-2012, 22:37
But where do i add that code is what im confused about
:D Sorry your're new to Sourcemod...
before you want to make own Plugins ("Thats where you will put this code in") check the Intro: http://wiki.alliedmods.net/Introduction_to_SourcePawn#decl
Buzzbrad
02-07-2012, 07:47
:D Sorry your're new to Sourcemod...
before you want to make own Plugins ("Thats where you will put this code in") check the Intro: http://wiki.alliedmods.net/Introduction_to_SourcePawn#decl
Ok thanks will that also specify so i can make it some only certain steam id's have it?
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.