boionfire81 Posted April 10, 2016 Share Posted April 10, 2016 Didn't know where to post this so I posted here. I'm looking for ags_cs4 from mccodes. I bought his protection mod, but it doesn't do anything for an attack. I'm hoping to find him for help getting it to work. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 10, 2016 Share Posted April 10, 2016 You can try tagging [uSER=68637]ags_cs4[/uSER]. Hopefully this tag works ;) Quote Link to comment Share on other sites More sharing options...
Zettieee Posted April 10, 2016 Share Posted April 10, 2016 Or maybe stop buying mods and hire someone to do the same thing xD Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 10, 2016 Author Share Posted April 10, 2016 yeah the crons are there, the table info is there guard=time guardon=0/1. The purchase form is there. But there is nothing to actually stop the attack >.< Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 10, 2016 Author Share Posted April 10, 2016 Kinda like to make so if guardon = 1 attackers hp = -10% and echo you can not attack this person they are under protection, while still blocking the attack lol! Quote Link to comment Share on other sites More sharing options...
Dominion Posted April 13, 2016 Share Posted April 13, 2016 I haven't seen an mccodes staff member around in months, I'd suggest not using their website unless you know the seller is still active. Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 13, 2016 Author Share Posted April 13, 2016 well I've bought all the mods I wanted already so lol Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 14, 2016 Share Posted April 14, 2016 *cough* I'm right here ;) I respond to tickets just don't perform payouts Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 14, 2016 Author Share Posted April 14, 2016 Yeah this and the Ajax Gang Chat seem to be a no go. No support for either. Luckily [uSER=70347]NonStopCoding[/uSER] supported his and updated it :) Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted April 14, 2016 Share Posted April 14, 2016 I always support my modules :) and try something like this if($ir['guard'] >= time() && $ir['guardon']) { echo "This user is protected against blocks."; $h->endpage(); exit; } or a simple if($ir['guardon']) { echo "This user is protected against blocks."; $h->endpage(); exit; } Quote Link to comment Share on other sites More sharing options...
Dominion Posted April 14, 2016 Share Posted April 14, 2016 My bad @KyleMassacre wasn't aware you were Mccodes staff. Together with this site you really have been keeping them going haven't you? :p Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 14, 2016 Author Share Posted April 14, 2016 (edited) I always support my modules :) and try something like this if($ir['guard'] >= time() && $ir['guardon']) { echo "This user is protected against blocks."; $h->endpage(); exit; } or a simple if($ir['guardon']) { echo "This user is protected against blocks."; $h->endpage(); exit; } Cool thanks man! Think there is a way to put a random hp reduction in there too? Like from 1-10%? No hosp time though. Edited April 15, 2016 by boionfire81 my bad forgot db query can still be run when the if is Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 14, 2016 Share Posted April 14, 2016 Haha yeah I try. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 15, 2016 Share Posted April 15, 2016 You can try something like: $one = floor(1/$ir['maxhp'])*100; $ten = floor(10/$ir['maxhp'])*100; $rand = rand($one,$ten); if($rand > $ir['hp']) { $rand = $ir['hp']; } $db->query('update users set hp = hp - '.$rand.' where userid = '.$ir['userid']); Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted April 15, 2016 Share Posted April 15, 2016 Another way could be pretty "much the same as kyle lol" $loseperc = mt_rand(1,10); $perc = $ir['hp'] / 100 * $loseperc; $health = $ir['hp'] - $perc; if($health >= $ir['maxhp']) $health = $ir['maxhp']) $db->query("UPDATE `users` SET `hp` = `hp` - {$health} WHERE `userid` = ".$ir['userid']); Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 15, 2016 Author Share Posted April 15, 2016 (edited) Oh wow, look at that math lol! I came up with else if($ir['guardon'] = 1) { $amt=rand(20,200); echo "Some say protection is for sissys. Well this sissy just took some of your health. So let that be a lesson, keeping protection is a good thing!"; $db->query("UPDATE `users` SET `hp` = `hp` - (`maxhp`/$amt) WHERE `userid` = $userid"); $h->endpage(); exit; } Edited April 15, 2016 by boionfire81 Just noticed I didn't check for negative values -.- Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.