Raised This Month: $ Target: $400
 0% 

All players.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
pdoubleopdawg
Senior Member
Join Date: Aug 2005
Old 09-09-2005 , 22:13   All players.
Reply With Quote #1

I'm trying to make as_disco_all work, as_disco works. I think it's something to do with i and set task or something.

Also, I know there's a way to make this shorter. I tried putting

if(containi(player,"@all")) {
set_task(0.3,"allfunc",i,_,_,"b")
}

(not exactly) and junk. Although my main priority is to get as_disco all to work.

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <fun> #define PLUGIN "Admin System" #define VERSION "0.1" #define AUTHOR "DahVid" new players[32],num,i //use these one too many time! :) public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("as_disco","disco",ADMIN_BAN,"as_disco <user>")     register_clcmd("as_disco_all","disco_allstart",ADMIN_BAN,"as_discoall (disco's all users!") } public disco(id) {     if(!is_user_admin(id)) {         console_print(id,"[ASMod]Sorry, this command is for administrators ONLY!")         return PLUGIN_HANDLED     }     new player[33]     read_argv(1,player,32)     new target=cmd_target(id,player,9)     if(!is_user_connected(target)) {         console_print(id,"[ASMod]The player you have entered has not been found in the server or he has immunity.")     }     //Thanks to GHW_Chronic for the idea!     set_task(0.3,"disco_start",target,_,_,"b")         return PLUGIN_CONTINUE } public disco_start(target) {     if(!is_user_connected(target)) {         return PLUGIN_HANDLED     }     new red,green,blue,alpha     red=random_num(0,255)     green=random_num(0,255)     blue=random_num(0,255)     alpha=random_num(30,220)         message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},target)     write_short(~0)     write_short(~0)     write_short(1<<12)     write_byte(red)     write_byte(green)     write_byte(blue)     write_byte(alpha)     message_end()         set_user_rendering(target,kRenderFxGlowShell,red,green,blue,kRenderTransAlpha,255)         return PLUGIN_CONTINUE } public disco_allstart() {     get_players(players,num)     for(i=0;i<=num;i++) {         set_task(0.3,"disco_all",i,_,_,"b")     } } public disco_all() {     get_players(players,num)     for(i=0;i<=num;i++) {         if(!is_user_connected(i)) {             return PLUGIN_HANDLED         }         new red,green,blue,alpha         red=random_num(0,255)         green=random_num(0,255)         blue=random_num(0,255)         alpha=random_num(30,220)                 message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},i)         write_short(~0)         write_short(~0)         write_short(1<<12)         write_byte(red)         write_byte(green)         write_byte(blue)         write_byte(alpha)         message_end()                 set_user_rendering(i,kRenderFxGlowShell,red,green,blue,kRenderTransAlpha,255)     }     return PLUGIN_HANDLED }
pdoubleopdawg is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:19.


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