Raised This Month: $94 Target: $400
 23% 

1950's Cloaking Device


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff        Approver:   devicenull (200)
DarkShadowST
Member
Join Date: Apr 2004
Location: Texas
Old 02-06-2005 , 03:15   1950's Cloaking Device
Reply With Quote #1

Rather then make you 100% invisible or like, partially invisible
I made this:

Untested (I'm drunk and my friends aren't on )

Edit: Everything works 'cept cd_power

Tell me if it sux

Code:
/*     1950's Cloaking Device Created By DarkShadowST         Invisibility plugins are kinda strange:         You can only be fully invisible (not really fair to other people)     OR     Partially invisible (not really fair to you)         This makes it so every x seconds you fade back in for x seconds and then fade out again     Looks really creepy when you're trying to track the movement of someone wearing     this cloaking device...         First plugin in Forever         I called it 1950's Cloaking Device because nothing worked perfectly in the 1950's     (Source: NASA - Korean War - People in General) */ #include <amxmodx> #include <fun> #include <amxmisc> #define ACCESS_LEVEL ADMIN_SLAY new PLUGIN_NAME[] = "1950's Cloaking Device" new PLUGIN_AUTHOR[] = "DarkShadowST" new PLUGIN_VERSION[] = "0.1" new cloaked_users[33]; //Hold  the Id's of cloaked users public plugin_init() {         register_plugin(PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_AUTHOR);     register_concmd("amx_cloaking","set_cd_device",ACCESS_LEVEL," Usage: amx_cloaking Person <1|0>");     register_cvar("cd_worktime","2.0");    //The Time you are invisible     register_cvar("cd_downtime","1.0");    //The Time you are not invisible     register_cvar("cd_power","0");        //Your alpha value incase u don't like completely invisible } public set_cd_device(id) {         if(!(get_user_flags(id)&ACCESS_LEVEL)) {         client_print(id,print_console,"[AMXX] You Do Not Have Access To This Command");         return PLUGIN_HANDLED;     }     if(read_argc() < 3 || read_argc() > 3) {         client_print(id,print_console,"[AMXX] Usage: amx_cloaking <Player|@CT|@T|all> <1|0>");         return PLUGIN_HANDLED;     }     new target[40];     new choice[4];     read_argv(1,target,39);     read_argv(2,choice,3);     /////All Players////////////////////////////////////////////////////     if(equali(target,"all") || equali(target,"*")) {                 if(equali(choice,"1") || equali(choice,"on")) {                     new players[32], inum             get_players(players,inum,"a")             for(new i = 0; i < inum; ++i) {                             if(get_user_flags(players[i])&ADMIN_IMMUNITY)                     continue                                 if(cloaked_users[players[i]] == 1)                     continue                                     set_user_rendering(players[i],kRenderFxGlowShell,0,0,0,kRenderTransAlpha,str_to_num("cd_power"))                                 cloaked_users[players[i]] = 1;                 new player_id[3];                 player_id[0] = players[i];                 set_task(get_cvar_float("cd_worktime"),"cd_disable",(1573+players[i]),player_id,1);             }             new admin[33]             get_user_name(id,admin,32)             switch(get_cvar_num("amx_show_activity")) {                             case 2: client_print(0,print_chat,"[AMXX] Admin %s: Has Enabled Cloaking Device on Everybody",admin)                 case 1: client_print(0,print_chat,"[AMX] Admin Has Enabled Cloaking Device on Everybody")             }             client_print(id,print_console,"[AMX] Cloaking Device Enabled for Everyone")             return PLUGIN_HANDLED         }         if(equali(choice,"0") || equali(choice,"off")) {                     new players[32], inum             get_players(players,inum,"a")             for(new i = 0; i < inum; ++i) {                             if(get_user_flags(players[i])&ADMIN_IMMUNITY)                     continue                                 if(cloaked_users[players[i]] == 0)                     continue                                     //set_user_rendering(players[i],kRenderFxGlowShell,0,0,0,kRenderTransAlpha,250)                 set_user_rendering(players[i]);                                 cloaked_users[players[i]] = 0;                 remove_task(1573+players[i]);             }             new admin[33]             get_user_name(id,admin,32)             switch(get_cvar_num("amx_show_activity")) {                             case 2: client_print(0,print_chat,"[AMXX] Admin %s: Has Disabled Cloaking Device on Everybody",admin)                 case 1: client_print(0,print_chat,"[AMX] Admin Has Disabled Cloaking Device on Everybody")             }             client_print(id,print_console,"[AMX] Cloaking Device Disabled for Everyone")             return PLUGIN_HANDLED         }         client_print(id,print_console,"[AMXX] Usage: amx_cloaking <Player|@CT|@T|all> <1|0>");         return PLUGIN_HANDLED     }     /////Team Specific//(CT)/////////////////////////////////////////////////     if(equali(target,"@CT")) {                 if(equali(choice,"1") || equali(choice,"on")) {                     new players[32], inum             get_players(players,inum,"ae","CT")             for(new i = 0; i < inum; ++i) {                             if(get_user_flags(players[i])&ADMIN_IMMUNITY)                     continue                                 if(cloaked_users[players[i]] == 1)                     continue                                     set_user_rendering(players[i],kRenderFxGlowShell,0,0,0,kRenderTransAlpha,str_to_num("cd_power"));                                 cloaked_users[players[i]] = 1;                 new player_id[2];                 player_id[0] = players[i];                 set_task(get_cvar_float("cd_worktime"),"cd_disable",1573+id,player_id,1);             }             new admin[33]             get_user_name(id,admin,32)             switch(get_cvar_num("amx_show_activity")) {                             case 2: client_print(0,print_chat,"[AMXX] Admin %s: Has Enabled Cloaking Device for all the CT's",admin)                 case 1: client_print(0,print_chat,"[AMX] Admin Has Enabled Cloaking Device for all the CT's")             }             client_print(id,print_console,"[AMX] Cloaking Device Enabled for all CT's")             return PLUGIN_HANDLED         }         if(equali(choice,"0") || equali(choice,"off")) {                     new players[32], inum             get_players(players,inum,"ae","CT")             for(new i = 0; i < inum; ++i) {                             if(get_user_flags(players[i])&ADMIN_IMMUNITY)                     continue                                 if(cloaked_users[players[i]] == 0)                     continue                                     //set_user_rendering(players[i],kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255)                 set_user_rendering(players[i]);                                 cloaked_users[players[i]] = 0;                 new player_id[2];                 player_id[0] = players[i];                 remove_task(1573+players[i]);             }             new admin[33]             get_user_name(id,admin,32)             switch(get_cvar_num("amx_show_activity")) {                             case 2: client_print(0,print_chat,"[AMXX] Admin %s: Has Disabled Cloaking Device for all the CT's",admin)                 case 1: client_print(0,print_chat,"[AMX] Admin Has Enabled Cloaking Device for all the CT's")             }             client_print(id,print_console,"[AMX] Cloaking Device Disabled for all CT's")             return PLUGIN_HANDLED         }         client_print(id,print_console,"[AMXX] Usage: amx_cloaking <Player|@CT|@T|all> <1|0>");         return PLUGIN_HANDLED     }     /////Team Specific//(T)/////////////////////////////////////////////////     if(equali(target,"@T") || equali(target,"@TERRORIST")) {                 if(equali(choice,"1") || equali(choice,"on")) {                     new players[32], inum             get_players(players,inum,"ae","TERRORIST")             for(new i = 0; i < inum; ++i) {                             if(get_user_flags(players[i])&ADMIN_IMMUNITY)                     continue                                 if(cloaked_users[players[i]] == 1)                     continue                                     set_user_rendering(players[i],kRenderFxGlowShell,0,0,0,kRenderTransAlpha,str_to_num("cd_power"));                                 cloaked_users[players[i]] = 1;                 new player_id[2];                 player_id[0] = players[i];                 set_task(get_cvar_float("cd_worktime"),"cd_disable",1573+id,player_id,1);             }             new admin[33]             get_user_name(id,admin,32)             switch(get_cvar_num("amx_show_activity")) {                             case 2: client_print(0,print_chat,"[AMXX] Admin %s: Has Enabled Cloaking Device for all the Terrorists",admin)                 case 1: client_print(0,print_chat,"[AMX] Admin Has Enabled Cloaking Device for all the Terrorists")             }             client_print(id,print_console,"[AMX] Cloaking Device Enabled for all Terrorists")             return PLUGIN_HANDLED         }         if(equali(choice,"0") || equali(choice,"off")) {                     new players[32], inum             get_players(players,inum,"ae","TERRORIST")             for(new i = 0; i < inum; ++i) {                             if(get_user_flags(players[i])&ADMIN_IMMUNITY)                     continue                                 if(cloaked_users[players[i]] == 0)                     continue                                     //set_user_rendering(players[i],kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255)                 set_user_rendering(players[i]);                                 cloaked_users[players[i]] = 0;                 new player_id[2];                 player_id[0] = players[i];                 remove_task(1573+players[i]);             }             new admin[33]             get_user_name(id,admin,32)             switch(get_cvar_num("amx_show_activity")) {                             case 2: client_print(0,print_chat,"[AMXX] Admin %s: Has Disabled Cloaking Device for all the Terrorists",admin)                 case 1: client_print(0,print_chat,"[AMX] Admin Has Disabled Cloaking Device for all the Terrorists")             }             client_print(id,print_console,"[AMX] Cloaking Device Disabled for all CT's")             return PLUGIN_HANDLED         }         client_print(id,print_console,"[AMXX] Usage: amx_cloaking <Player|@CT|@T|all> <1|0>");         return PLUGIN_HANDLED     }     new player = cmd_target(id,target,7)     if(!player) return PLUGIN_HANDLED     if(equali(choice,"1") || equali(choice,"on")) {                     /*if(get_user_flags(player)&ADMIN_IMMUNITY) {                 client_print(id,print_console,"[AMXX] Client has Immunity");                 return PLUGIN_HANDLED;             }*/             if(cloaked_users[player] == 1) {                 client_print(id,print_console,"[AMXX] Client Already Has Cloaking Device");                 return PLUGIN_HANDLED;             }                         set_user_rendering(player,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,str_to_num("cd_power"));                             cloaked_users[player] = 1;             new player_id[2];             player_id[0] = player;             set_task(get_cvar_float("cd_worktime"),"cd_disable",1573+id,player_id,1);                         new admin[33]             new pname[33]             get_user_name(id,admin,32)             get_user_name(player,pname,32)             switch(get_cvar_num("amx_show_activity")) {                             case 2: client_print(0,print_chat,"[AMXX] Admin %s: Has Enabled Cloaking Device for %s",admin,pname)                 case 1: client_print(0,print_chat,"[AMX] Admin Has Enabled Cloaking Device for %s",pname)             }             client_print(id,print_console,"[AMX] Cloaking Device Enabled for %s",pname)             return PLUGIN_HANDLED     }     if(equali(choice,"0") || equali(choice,"off")) {                 /*if(get_user_flags(player)&ADMIN_IMMUNITY) {             client_print(id,print_console,"[AMXX] Client has Immunity");             return PLUGIN_HANDLED;         }*/         if(cloaked_users[player] == 0) {             client_print(id,print_console,"[AMXX] Client Doesn't Have a Cloaking Device");             return PLUGIN_HANDLED;         }         //set_user_rendering(player,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,250));         set_user_rendering(player);                     cloaked_users[player] = 0;         new player_id[2];         player_id[0] = player;         remove_task(1573 + player);                     new admin[33]         new pname[33]         get_user_name(id,admin,32)         get_user_name(player,pname,32)         switch(get_cvar_num("amx_show_activity")) {                     case 2: client_print(0,print_chat,"[AMXX] Admin %s: Has Disabled Cloaking Device for %s",admin,pname)             case 1: client_print(0,print_chat,"[AMX] Admin Has Disabled Cloaking Device for %s",pname)         }         client_print(id,print_console,"[AMX] Cloaking Device Disabled for %s",pname)         return PLUGIN_HANDLED     }     client_print(id,print_console,"[AMXX] Usage: amx_cloaking <Player|@CT|@T|all> <1|0>");     return PLUGIN_HANDLED } public cd_disable(player_id[]) {         new id = player_id[0];     set_user_rendering(id);     set_task(get_cvar_float("cd_downtime"),"cd_enable",1573+id,player_id,1);     return PLUGIN_CONTINUE; } public cd_enable(player_id[]) {         new id = player_id[0];     set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,str_to_num("cd_power"));     set_task(get_cvar_float("cd_worktime"),"cd_disable",1573+id,player_id,1);     return PLUGIN_CONTINUE; } public client_connect(id) {         cloaked_users[id] = 0;     return PLUGIN_CONTINUE; } public client_disconnect(id) {         if(cloaked_users[id] == 1) {         cloaked_users[id] = 0;         remove_task(1573 + id);     }     return PLUGIN_CONTINUE; }
Attached Files
File Type: sma Get Plugin or Get Source (cloaking_device.sma - 1926 views - 11.2 KB)
__________________
My Current Desktop:
Entire

DONT WATCH ME!!! Evil...People...
DarkShadowST is offline
Send a message via AIM to DarkShadowST Send a message via MSN to DarkShadowST Send a message via Yahoo to DarkShadowST
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-06-2005 , 04:26  
Reply With Quote #2

In the top of the sma you should put how to use it (even though it prints in chat) .
Quote:
amx_cloaking <Player|@CT|@T|all> <1|0>
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
DarkShadowST
Member
Join Date: Apr 2004
Location: Texas
Old 02-06-2005 , 05:25   Yea...
Reply With Quote #3

Okay....yea....I tested it w/ my friends
it works awesome
'cept cd_power doesn't work right
you just have to settle w/ flashing completely invis & w/e

I think it's tight as shit....we played arond w/ it and it's sooo cool
plus it works between rounds which pwns

the alcohol is wearing off

Quote:
In the top of the sma you should put how to use it (even though it prints in chat) Smile.
^ You did it for me ty...just so everyone knows...that's how u use it
__________________
My Current Desktop:
Entire

DONT WATCH ME!!! Evil...People...
DarkShadowST is offline
Send a message via AIM to DarkShadowST Send a message via MSN to DarkShadowST Send a message via Yahoo to DarkShadowST
manorastroman
Senior Member
Join Date: Oct 2004
Old 02-06-2005 , 14:21  
Reply With Quote #4

sounds like fun! but you dont need to put the sma inside your post
__________________
manorastroman is offline
Send a message via AIM to manorastroman Send a message via MSN to manorastroman Send a message via Skype™ to manorastroman
DarkShadowST
Member
Join Date: Apr 2004
Location: Texas
Old 02-06-2005 , 17:34  
Reply With Quote #5

I know....I usually post the .sma becuase that way you don't have to dl the .sma and open it to see it, you can just glance at it as you read the post...
__________________
My Current Desktop:
Entire

DONT WATCH ME!!! Evil...People...
DarkShadowST is offline
Send a message via AIM to DarkShadowST Send a message via MSN to DarkShadowST Send a message via Yahoo to DarkShadowST
DarkShadowST
Member
Join Date: Apr 2004
Location: Texas
Old 02-06-2005 , 23:43  
Reply With Quote #6

Any chance I could get this approved?
Pretty please?
__________________
My Current Desktop:
Entire

DONT WATCH ME!!! Evil...People...
DarkShadowST is offline
Send a message via AIM to DarkShadowST Send a message via MSN to DarkShadowST Send a message via Yahoo to DarkShadowST
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 07-29-2005 , 14:22  
Reply With Quote #7

The x seconds is completely invis right? I can see how this is interesting . Will try testing it. Also, does it turn on auto for everyone, or do clients have to do something.
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 07-29-2005 , 15:17  
Reply With Quote #8

one awkward problem, every time i try downloading this, it Mcafee tells me it found a virus in my temp folder, wtf...........its never done this before on any other plugins (it says this for the sma).
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
MattOG
Senior Member
Join Date: May 2005
Old 07-29-2005 , 15:43  
Reply With Quote #9

Quote:
Originally Posted by Lord_Destros
one awkward problem, every time i try downloading this, it Mcafee tells me it found a virus in my temp folder, wtf...........its never done this before on any other plugins (it says this for the sma).
Same, the temp file it puts on your comp (while it downloads) is apparently infected with a univ.script/99a virus ( I'm assuming that means universal script).

Not sure what you done here. Try deleting the .sma you've posted, open up the one you got, and save a clean copy of it. Then repost that for every1 to download.
__________________

+Karma If I helped
MattOG is offline
Proach
Veteran Member
Join Date: Jan 2005
Location: The Netherlands
Old 07-29-2005 , 16:41  
Reply With Quote #10

or justy copy the code in the posted above and paste it in a text file then save it as an .sma ;)
__________________

www.psmod.net (the better psychostats)
PAOL
Proach is offline
Send a message via ICQ to Proach
Reply


Thread Tools
Display Modes

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 23:12.


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