AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hitzone Manipulation Plugin (https://forums.alliedmods.net/showthread.php?t=25527)

Kronos 03-15-2006 17:47

Hitzone Manipulation Plugin
 
I created a hitzone manipulation plugin, that every x seconds, as defined by amx_dodgetime <time> removes a hitzone at random.
I was wondering if there was errors in the scripts, because even though it compiled fine, I'm not sure it actually sets out what I intended it to do.
One of the things I'm not sure about is my "for" loop. Can anyone help me in refining this code?

Code:
/* Plugin Name: amx_dodge Author: Kronos Commands: amx_dodge <name> - Allows user to dodge bullets (AKA Hitzone Manipulation) CVARs: amx_dodgetime <time> - Defines how fast user dodges the bullets. Credits: Thanks to Kensai for his Regen Code Changelog: v1.0 - First version */

Kraugh 03-16-2006 02:05

assuming your numbers are correct (127, 191, etcetera), then it should work. if you want to "refine" your for loop, you could try this:

Code:
new players[32], num, i; get_players(players,num,"a"); for(i=0;i<num;i++) {    // perform actions on: players[i] -- assume they are both connected and alive }


All times are GMT -4. The time now is 16:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.