|
Post by xyz on Jun 20, 2009 1:47:10 GMT 1
New award i added in my mod, just thought id let you guys know of it, its pretty cool.. Alt knife attack distance gets measured and recorded so whenever a record gets broken it gets announced to server and then u can at end of map tell everyone who has the longest knife throw stun.. to max: since your admins abused me you can code it your self... pretty simple. removed the code because of the dick head under neath Im sure thats enough for you to get the picture... you can make your own version from there if you want this in your mod.. but its pretty straight forward
|
|
|
Post by Mario on Jun 20, 2009 10:50:21 GMT 1
AHHHH SHUTUP
|
|
|
Post by xyz on Jun 20, 2009 12:25:24 GMT 1
Whats your problem *Censored Word* weed?
im suggesting stuff for your mod which will make it better, get a life
|
|
|
Post by Charlie on Jun 20, 2009 12:54:31 GMT 1
Mario, what's your problem? He's only helping Max...?
|
|
|
Post by usdrama on Jun 20, 2009 13:23:44 GMT 1
Question: Is the lagg distance included..? When people lagg they stun you before you can react, and usually they do this from quite a distance.
|
|
|
Post by Charlie on Jun 20, 2009 14:41:14 GMT 1
Question: Is the lagg distance included..? When people lagg they stun you before you can react, and usually they do this from quite a distance. It's throw stuns, not normal stuns...
|
|
|
Post by xyz on Jun 21, 2009 2:40:22 GMT 1
max its pretty simple to make.. ill give you the basics, you of course need validation on the client to make sure he aint stunnin people who are afk etc...
if ( Distance( attackerorigin, targorigin) > level.recordOrigin ) { print messages here etc level.recordOrigin = Distance(attackerorigin, targorigin); }
thats pretty much it to be honest, Distance is the main feature.. ill give you my full code..
// 257 as its ALT_ATTACK on the knife
In g_local.c level_locals vec_t distanceRecord; gentity_t *distanceEntity;
In g_main.c G_InitGame level.distanceEntity = NULL;
In g_combat.c G_Damage fucntion
if ( mod == 257 ) { if ( attacker->client->sess.team != targ->client->sess.team ) {
vec_t distance = Distance(attacker->r.currentOrigin,targ->r.currentOrigin);
if ( distance > level.distanceRecord ) { if ( level.distanceEntity != NULL ) { char *allMsg; char *clientMsg;
if ( level.distanceEntity == attacker ) { allMsg = va("%s broke his own longest stun record!", attacker->client->pers.netname ); clientMsg = va("You broke your own longest stun record!"); } else { allMsg = va("%s broke %s's longest stun record!", attacker->client->pers.netname, level.distanceEntity->client->pers.netname ); clientMsg = va("You broke %s's longest stun record!", level.distanceEntity->client->pers.netname ); }
trap_SendServerCommand( -1, va("cp \"^7%s\n\"", allMsg ) ); trap_SendServerCommand( attacker->s.number, va("cp \"@^7%s\n\"", clientMsg ) ); }
level.distanceEntity = attacker; level.distanceRecord = distance; } } }
|
|
|
Post by max on Jun 21, 2009 14:50:56 GMT 1
Thanks, I might include that in a new version.
|
|
|
Post by xyz on Jun 22, 2009 0:50:54 GMT 1
its well leet
|
|