|
Chuck
|
 |
« on: January 16, 2012, 05:44:21 PM » |
|
It would be great if someone code this script that if person wearing server clan tag, xp rate will be like 1.2 higher!
|
|
|
|
|
Logged
|
|
|
|
|
Vulpone
|
 |
« Reply #1 on: January 17, 2012, 12:46:22 AM » |
|
It would be great if someone code this script that if person wearing server clan tag, xp rate will be like 1.2 higher!
Would be sorta hard to code, as afaik it would have to be coded for every Server. I could do it for you if you give me the clan-tag... But being flexible is hard.
|
|
|
|
|
Logged
|
Sapere aude!
|
|
|
Glider⠠⠵
Global Moderator
Sr. Member
    
Posts: 402
⠠⠵
|
 |
« Reply #2 on: January 17, 2012, 02:32:35 AM » |
|
There's a extension to query steam groups. It would be quite easy to make a addon that gives a xp bonus to everyone in a specific steam group.
That's most likely the safest and most reliable way to code this.
|
|
|
|
|
Logged
|
|
|
|
|
Revan
|
 |
« Reply #3 on: January 17, 2012, 02:57:52 AM » |
|
It's possible to return the clantag from a Player.. There's a snippet somewhere on the sm Forums - to be dynamic you should use convars or something similar
|
|
|
|
|
Logged
|
|
|
|
|
nvn
|
 |
« Reply #4 on: January 17, 2012, 03:03:03 AM » |
|
There's a extension to query steam groups. It would be quite easy to make a addon that gives a xp bonus to everyone in a specific steam group.
That's most likely the safest and most reliable way to code this.
sm 1.4 have GetClientClanTag stock, it would be easier to use it instead of fetching all groups client have. As i see, Chuck is asking about clantags, not groups. The difference is that we dont need to know in what group he is, we just compare if clantag he have matchs clantag we set with cvar (or just hardcoded)
|
|
|
|
|
Logged
|
|
|
|
|
iceman
|
 |
« Reply #5 on: January 17, 2012, 05:52:28 AM » |
|
As glider said would it not be safer using steam tools so we don't have to worry about running clan name protection
|
|
|
|
|
Logged
|
|
|
|
Glider⠠⠵
Global Moderator
Sr. Member
    
Posts: 402
⠠⠵
|
 |
« Reply #6 on: January 17, 2012, 06:51:56 AM » |
|
As glider said would it not be safer using steam tools so we don't have to worry about running clan name protection
Exactly. What prevents me from changing my name to [ExtraXP] Glider? Some sort of protection that querys if I'm actually in the steam group for the [ExtraXP] clan? I see some unnecessary hoops here 
|
|
|
|
|
Logged
|
|
|
|
|
Revan
|
 |
« Reply #7 on: January 17, 2012, 08:30:18 AM » |
|
U dont played CSS? There's no clantag faking - u can only choose a clantag if u are in the steamgroup. clantags aren't the Same as playernames pic
|
|
|
|
« Last Edit: January 17, 2012, 09:43:46 AM by Revan »
|
Logged
|
|
|
|
|
Chuck
|
 |
« Reply #8 on: January 17, 2012, 10:55:41 AM » |
|
it should read steam group if there is a code for api! example player join my server and wearing my steam group clan tag so mine is .:|Tmu|:., only in scoreboard you can see clan tag .:|Tmu|:. but not in chat box like normally! If it really hard then I'll take it as clan tag name! But it would be great idea to have this addons for next war3 release! I see Schandmaul's server already have that in their server!
|
|
|
|
|
Logged
|
|
|
|
|
Schmarotzer
|
 |
« Reply #9 on: January 17, 2012, 11:35:06 AM » |
|
I'm not Schandmaul.I am Schmarotzer Yup, I made this plugin
|
|
|
|
|
Logged
|
Welcome to my server
|
|
|
|
Revan
|
 |
« Reply #10 on: January 17, 2012, 11:41:34 AM » |
|
- dont uses steamtools ext. but checks for clantag(not playername, uses cstrike extension instead[only works in css]) - Note: untested, tell me if this isn't working correctly #include <sourcemod> #include <cstrike> #include "W3SIncs/War3Source_Interface" new Handle:g_hClanVar = INVALID_HANDLE; new Handle:g_hGOMultipler = INVALID_HANDLE; new Handle:g_hXPMultipler = INVALID_HANDLE; public Plugin:myinfo= { name="W3S Addon ClanBonus", author="Revan", description="War3Source Addon Plugin", version="1.0", };
public OnPluginStart() { g_hClanVar = CreateConVar("war3_bonusclan_name",".:|Tmu|:.","Player who are wearing this clantag will gain bonus XP"); g_hGOMultipler = CreateConVar("war3_bonusclan_xprate","1.2","Bonus XP Multipler"); g_hXPMultipler = CreateConVar("war3_bonusclan_goldrate","1.0","Bonus Gold Multipler"); }
public OnWar3Event(W3EVENT:event,client) { if(event==OnPreGiveXPGold && !IsFakeClient(client)) { decl String:buffer[32],String:buffer2[32]; CS_GetClientClanTag(client, buffer, sizeof(buffer)); GetConVarString(g_hClanVar,buffer2,sizeof(buffer2)) if(strlen(buffer)>0 && strlen(buffer2)>0) { if(strcmp(buffer, buffer2)==0) { W3SetVar(EventArg2,FloatMul(W3GetVar(EventArg2),GetConVarFloat(g_hXPMultipler))); W3SetVar(EventArg3,FloatMul(W3GetVar(EventArg3),GetConVarFloat(g_hGOMultipler))); } } } }
cvarlist: war3_bonusclan ".:|Tmu|:." - actually the bonused clan war3_bonusclan_xprate "1.2" - xp multipler war3_bonusclan_goldrate "1.0" - gold multipler EDIT: I can look into steamtools extension if u want
|
|
|
|
« Last Edit: February 14, 2012, 12:30:52 PM by Revan »
|
Logged
|
|
|
|
|
alex0310
|
 |
« Reply #11 on: January 17, 2012, 12:11:07 PM » |
|
must I have sm1.4?
|
|
|
|
|
Logged
|
|
|
|
|
Revan
|
 |
« Reply #12 on: January 17, 2012, 01:47:51 PM » |
|
basicly yes. but you can try just updating the cstrike extension, it should work too
|
|
|
|
|
Logged
|
|
|
|
|
Revan
|
 |
« Reply #13 on: January 17, 2012, 03:31:04 PM » |
|
seems like something is wrong with the XP Multipler, I gonna check this tomorrow or u can do this by yourself( just don't forget posting it  ) just some notice
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Chuck
|
 |
« Reply #15 on: January 18, 2012, 03:50:15 AM » |
|
revan got everything working except the xp rate and gold rate having problem!
|
|
|
|
|
Logged
|
|
|
|
Glider⠠⠵
Global Moderator
Sr. Member
    
Posts: 402
⠠⠵
|
 |
« Reply #16 on: January 18, 2012, 06:33:05 AM » |
|
U dont played CSS? There's no clantag faking - u can only choose a clantag if u are in the steamgroup. clantags aren't the Same as playernames picNo I do not play CSS. I messed around with War3Source on it before, but only locally against bots. I never played it online and I don't intend to ever do it either. With this addon I was thinking of something that would work across games and not just in CSS...
|
|
|
|
|
Logged
|
|
|
|
|
Ownz
|
 |
« Reply #17 on: January 18, 2012, 12:51:48 PM » |
|
OOOO put that on svn
|
|
|
|
|
Logged
|
 DarkEnergy
|
|
|
|
Chuck
|
 |
« Reply #18 on: January 23, 2012, 04:04:09 PM » |
|
@Ownz, can you figure out what's wrong with clan tag script if you have time....... Revan done everything good but something wrong with xp rate system
|
|
|
|
|
Logged
|
|
|
|
|
alex0310
|
 |
« Reply #19 on: February 17, 2012, 09:27:44 AM » |
|
I tested this addon. i had some trouble with cstrike.inc therefore i used cssclantags.inc and cssclantags.txt also i fixed some inaccuracy...
cvarlist: war3_bonusclan_name - actually the bonused clan war3_bonusclan_xprate - xp multipler war3_bonusclan_goldrate - gold multipler
Thank Revan and Chuck (for your idea & code)
|
|
|
|
« Last Edit: March 04, 2012, 05:40:46 AM by alex0310 »
|
Logged
|
|
|
|
|
Revan
|
 |
« Reply #20 on: February 17, 2012, 09:56:18 AM » |
|
Cool! If it works now we can put it on the svn
|
|
|
|
|
Logged
|
|
|
|
|
alex0310
|
 |
« Reply #21 on: February 17, 2012, 10:52:25 PM » |
|
I continue with my test I hope get responses to this version addon maybe have to add something )))
|
|
|
|
|
Logged
|
|
|
|
|
Chuck
|
 |
« Reply #22 on: February 20, 2012, 06:12:13 AM » |
|
Calculation for wearing clan tax is same as without wearing clan tag when it set 1.2xp!
|
|
|
|
|
Logged
|
|
|
|
|
alex0310
|
 |
« Reply #23 on: February 20, 2012, 08:19:51 AM » |
|
Calculation for wearing clan tax is same as without wearing clan tag when it set 1.2xp!
you should set cvar war3_bonusclan_name Your_ClanName if you don't set this cvar then calculation evaluate as usual
|
|
|
|
|
Logged
|
|
|
|
|
Chuck
|
 |
« Reply #24 on: February 20, 2012, 04:40:38 PM » |
|
Ya my group steam clan tag is set .:Tmu:.! still same
|
|
|
|
|
Logged
|
|
|
|
|