01-16-2012, 17:12
Hi all,
I want to create my own plugin with pluginmaker and I need help because I know anything about C#.
I just want a "promodlike" plugin which forces some values to all client who connect on the server :
Here the values I want to be forced
So, I launch plugin maker and I did like the pics show
After that no dll file was created, so I tried by an other way showed here
Always nothing appear...
So can someone help me for this simple plugin or could create it if it's easier than teach me
Thank you
I want to create my own plugin with pluginmaker and I need help because I know anything about C#.
I just want a "promodlike" plugin which forces some values to all client who connect on the server :
Here the values I want to be forced
Spoiler (Click to View)
cg_fov 80
com_maxfps 100
cl_maxpackets 100
cg_scoreboardpingtext 1
cg_ScoresPing_MaxBars 10
cg_ScoresPing_Interval 20
cg_crosshairEnemyColor 0
cg_scoreboardMyColor 0 0 0 0
waypointiconheight 12
waypointiconwidth 12
compassPlayerHeight 12
compassPlayerWidth 12
compassFriendlyHeight 12
compassFriendlyWidth 12
compassObjectiveHeight 12
compassObjectiveWidth 12
drawlagometer 1
ragdoll_enable 0
r_desaturation 0
r_dlightLimit 0
r_normalMap 0
r_outdoorFeather 0
r_polygonOffsetBias -16
r_polygonOffsetScale -4
r_drawSun 0
r_fog 0
snaps 30
com_maxfps 100
cl_maxpackets 100
cg_scoreboardpingtext 1
cg_ScoresPing_MaxBars 10
cg_ScoresPing_Interval 20
cg_crosshairEnemyColor 0
cg_scoreboardMyColor 0 0 0 0
waypointiconheight 12
waypointiconwidth 12
compassPlayerHeight 12
compassPlayerWidth 12
compassFriendlyHeight 12
compassFriendlyWidth 12
compassObjectiveHeight 12
compassObjectiveWidth 12
drawlagometer 1
ragdoll_enable 0
r_desaturation 0
r_dlightLimit 0
r_normalMap 0
r_outdoorFeather 0
r_polygonOffsetBias -16
r_polygonOffsetScale -4
r_drawSun 0
r_fog 0
snaps 30
- only onServerLoad
- SetClientDvar(Client.ClientNum, "cg_fov \"80\"");
SetClientDvar(Client.ClientNum, "com_maxfps \"100\"");
SetClientDvar(Client.ClientNum, "cl_maxpackets \"100\"");
SetClientDvar(Client.ClientNum, "cg_crosshairEnemyColor \"0\"");
SetClientDvar(Client.ClientNum, "cg_scoreboardMyColor \"0 0 0 0\"");
SetClientDvar(Client.ClientNum, "cg_scoreboardpingtext \"1\"");
SetClientDvar(Client.ClientNum, "cg_scoresPing_MaxBars \"10\"");
SetClientDvar(Client.ClientNum, "cg_scoresPing_interval \"20\"");
SetClientDvar(Client.ClientNum, "waypointiconheight \"12\"");
SetClientDvar(Client.ClientNum, "waypointiconwidth \"12\"");
SetClientDvar(Client.ClientNum, "compassPlayerWidth \"12\"");
SetClientDvar(Client.ClientNum, "compassPlayerHeight \"12\"");
SetClientDvar(Client.ClientNum, "compassFriendlyHeight \"12\"");
SetClientDvar(Client.ClientNum, "compassFriendlyWidth \"12\"");
SetClientDvar(Client.ClientNum, "compassObjectiveHeight \"12\"");
SetClientDvar(Client.ClientNum, "compassObjectiveHeight \"12\"");
SetClientDvar(Client.ClientNum, "drawlagometer \"1\"");
SetClientDvar(Client.ClientNum, "ragdoll_enable \"0\"");
SetClientDvar(Client.ClientNum, "r_desaturation \"0\"");
SetClientDvar(Client.ClientNum, "r_dlightLimit \"0\"");
SetClientDvar(Client.ClientNum, "r_drawsun \"0\"");
SetClientDvar(Client.ClientNum, "r_fog \"0\"");
SetClientDvar(Client.ClientNum, "r_normalmap \"0\"");
SetClientDvar(Client.ClientNum, "r_outdoorFeather \"0\"");
SetClientDvar(Client.ClientNum, "r_polygonOffsetBias \"-16\"");
SetClientDvar(Client.ClientNum, "r_polygonOffsetScale \"-4\"");
SetClientDvar(Client.ClientNum, "snaps \"30\"");
- click generate C# code
- and to finish click Compile!
After that no dll file was created, so I tried by an other way showed here
- only onSay
- string lowMsg = Message.ToLower();
if (lowMsg.StartsWith("!test"))
{
if (lowMsg.Length <= 6 )
{
TellClient(Client.ClientNum, "test settings change", true);
}
else
{
SetClientDvar(Client.ClientNum, "cg_fov \"80\"");
SetClientDvar(Client.ClientNum, "com_maxfps \"100\"");
SetClientDvar(Client.ClientNum, "cl_maxpackets \"100\"");
SetClientDvar(Client.ClientNum, "cg_crosshairEnemyColor \"0\"");
SetClientDvar(Client.ClientNum, "cg_scoreboardMyColor \"0 0 0 0\"");
SetClientDvar(Client.ClientNum, "cg_scoreboardpingtext \"1\"");
SetClientDvar(Client.ClientNum, "cg_scoresPing_MaxBars \"10\"");
SetClientDvar(Client.ClientNum, "cg_scoresPing_interval \"20\"");
SetClientDvar(Client.ClientNum, "waypointiconheight \"12\"");
SetClientDvar(Client.ClientNum, "waypointiconwidth \"12\"");
SetClientDvar(Client.ClientNum, "compassPlayerWidth \"12\"");
SetClientDvar(Client.ClientNum, "compassPlayerHeight \"12\"");
SetClientDvar(Client.ClientNum, "compassFriendlyHeight \"12\"");
SetClientDvar(Client.ClientNum, "compassFriendlyWidth \"12\"");
SetClientDvar(Client.ClientNum, "compassObjectiveHeight \"12\"");
SetClientDvar(Client.ClientNum, "compassObjectiveHeight \"12\"");
SetClientDvar(Client.ClientNum, "drawlagometer \"1\"");
SetClientDvar(Client.ClientNum, "ragdoll_enable \"0\"");
SetClientDvar(Client.ClientNum, "r_desaturation \"0\"");
SetClientDvar(Client.ClientNum, "r_dlightLimit \"0\"");
SetClientDvar(Client.ClientNum, "r_drawsun \"0\"");
SetClientDvar(Client.ClientNum, "r_fog \"0\"");
SetClientDvar(Client.ClientNum, "r_normalmap \"0\"");
SetClientDvar(Client.ClientNum, "r_outdoorFeather \"0\"");
SetClientDvar(Client.ClientNum, "r_polygonOffsetBias \"-16\"");
SetClientDvar(Client.ClientNum, "r_polygonOffsetScale \"-4\"");
SetClientDvar(Client.ClientNum, "snaps \"30\"");
TellClient(Client.ClientNum, "settings improved", true);
}
}
- click generate C# code
- click Compile!
Always nothing appear...
So can someone help me for this simple plugin or could create it if it's easier than teach me
Thank you