AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   More help learning (https://forums.alliedmods.net/showthread.php?t=361)

Peli 03-20-2004 20:24

Okay , I will try to do what you said , your name is too complicated so I'm just going to call you "Toxic". I will need help on what I need to do though , I am very confused :(

IceMouse[WrG] 03-20-2004 21:13

Give us a place to start helping you

Peli 03-20-2004 21:26

Any sugguestions on an easy plugin to make? I have never made them so I wouldn't know , your advice please then you guys can help me and explain what everything does.

tnsk8er27 03-20-2004 21:29

ohhh i thought you made some before...

make one that says hi everyone when you type a command in the console

QwertyAccess 03-20-2004 22:04

Quote:

Originally Posted by Peli
Any sugguestions on an easy plugin to make? I have never made them so I wouldn't know , your advice please then you guys can help me and explain what everything does.

an easy plugin to make would be is on the event of Resethud set their health to a certain number there you go you have a spawn health changer lol.

Peli 03-20-2004 23:58

Can you help me a bit more. I think I know how to do it. Would it be like this ?
Code:
public plugin_init() { register_plugin("sethealth","0.1","Peli") register_concmd("amx_sethealth,ADMIN_LEVEL_A") return PLUGIN_CONTINUE } public reset_hud { set_user_health(500) return PLUGIN_HANDLED }

Okay , things I didn't understand or know :
1. How would I write the "reset_hud" event? I just guessed sorry...
2. Do I just "set_user_health(500)" ? Or do I have to do more?

Okay , if you can please help me...

[RED-Designs] 03-21-2004 00:47

Quote:

Originally Posted by Peli
Can you help me a bit more. I think I know how to do it. Would it be like this ?
Code:
public plugin_init() { register_plugin("sethealth","0.1","Peli") register_concmd("amx_sethealth,ADMIN_LEVEL_A") return PLUGIN_CONTINUE } public reset_hud { set_user_health(500) return PLUGIN_HANDLED }

Okay , things I didn't understand or know :
1. How would I write the "reset_hud" event? I just guessed sorry...
2. Do I just "set_user_health(500)" ? Or do I have to do more?

Okay , if you can please help me...

Here is how it should be, or close to it.

Code:
/*  * Plugin by Peli and [RED-Designs]  */ #include <amxmod> #include <amxmisc> public plugin_init() { register_plugin("sethealth","0.1","Peli") register_concmd("amx_set500hp","admin_setHP",ADMIN_LEVEL_A,"<name>") return PLUGIN_CONTINUE } public admin_setHP(id,level,cid) {     if (!cmd_access(id,level,cid,3))         return PLUGIN_HANDLED     new arg[32], arg2[8], name2[32]     read_argv(1,arg,31)     read_argv(2,arg2,7)     get_user_name(id,name2,31)     if (arg[0]=='@'){         new players[32], inum         get_players(players,inum,"ae",arg[1])         if (inum==0){             console_print(id,"No clients in such team")             return PLUGIN_HANDLED         }         for(new a=0;a<inum;++a) {                         if(str_to_num(arg2)==1){                         set_user_health(players[a],500)                         }         }               switch(get_cvar_num("amx_show_activity"))   {                 case 2: client_print(0,print_chat,"ADMIN %s: set 500 hp on all %s",name2,arg[1])                 case 1: client_print(0,print_chat,"ADMIN: set 500 hp on all %s",arg[1])             }         console_print(id,"All clients have set noclip")     }     else {         new player = cmd_target(id,arg,7)         if (!player) return PLUGIN_HANDLED                 if(str_to_num(arg2)==1){                 set_user_health(player,500)         }         new name[32]         get_user_name(player,name,31)         switch(get_cvar_num("amx_show_activity"))   {                 case 2: client_print(0,print_chat,"ADMIN %s: set 500 hp on %s",name2,name)                 case 1: client_print(0,print_chat,"ADMIN: set 500 hp on %s",name)             }         console_print(id,"Client ^"%s^" has set noclip",name)     }     return PLUGIN_HANDLED   }

I havent tested it but I think it should work :D

MagicShot 03-21-2004 00:53

yeah
 
Yeah basically but, looks like your no-clip plugin :P

hehe

[RED-Designs] 03-21-2004 00:55

Re: yeah
 
Quote:

Originally Posted by MagicShot
Yeah basically but, looks like your no-clip plugin :P

hehe

Just cause I happen to make a plugin alot like another it looks like the other? (Trying to confuse the hell out of you with nonsense)

I like how the no-clip plugin was coded and I make alot of plugins like it. It gets the job done :D

Freecode 03-21-2004 00:57

Quote:

Originally Posted by [RED-Designs
]
Quote:

Originally Posted by Peli
Can you help me a bit more. I think I know how to do it. Would it be like this ?
Code:
public plugin_init() { register_plugin("sethealth","0.1","Peli") register_concmd("amx_sethealth,ADMIN_LEVEL_A") return PLUGIN_CONTINUE } public reset_hud { set_user_health(500) return PLUGIN_HANDLED }

Okay , things I didn't understand or know :
1. How would I write the "reset_hud" event? I just guessed sorry...
2. Do I just "set_user_health(500)" ? Or do I have to do more?

Okay , if you can please help me...

Here is how it should be, or close to it.

Code:
/*  * Plugin by Peli and [RED-Designs]  */ #include <amxmod> #include <amxmisc> public plugin_init() { register_plugin("sethealth","0.1","Peli") register_concmd("amx_set500hp","admin_setHP",ADMIN_LEVEL_A,"<name>") return PLUGIN_CONTINUE } public admin_setHP(id,level,cid) {     if (!cmd_access(id,level,cid,3))         return PLUGIN_HANDLED     new arg[32], arg2[8], name2[32]     read_argv(1,arg,31)     read_argv(2,arg2,7)     get_user_name(id,name2,31)     if (arg[0]=='@'){         new players[32], inum         get_players(players,inum,"ae",arg[1])         if (inum==0){             console_print(id,"No clients in such team")             return PLUGIN_HANDLED         }         for(new a=0;a<inum;++a) {                         if(str_to_num(arg2)==1){                         set_user_health(players[a],500)                         }         }               switch(get_cvar_num("amx_show_activity"))   {                 case 2: client_print(0,print_chat,"ADMIN %s: set 500 hp on all %s",name2,arg[1])                 case 1: client_print(0,print_chat,"ADMIN: set 500 hp on all %s",arg[1])             }         console_print(id,"All clients have set noclip")     }     else {         new player = cmd_target(id,arg,7)         if (!player) return PLUGIN_HANDLED                 if(str_to_num(arg2)==1){                 set_user_health(player,500)         }         new name[32]         get_user_name(player,name,31)         switch(get_cvar_num("amx_show_activity"))   {                 case 2: client_print(0,print_chat,"ADMIN %s: set 500 hp on %s",name2,name)                 case 1: client_print(0,print_chat,"ADMIN: set 500 hp on %s",name)             }         console_print(id,"Client ^"%s^" has set noclip",name)     }     return PLUGIN_HANDLED   }

I havent tested it but I think it should work :D

nope wrong
if u read what he asked you would noe what he wanted.
1. you need to register ResetHUD event
2. Yes you need to pass an id parameter. set_user_health(id,500)
Code:
public plugin_init() { register_plugin("sethealth","0.1","Peli") register_clcmd("amx_sethealth","setH",ADMIN_LEVEL_A,"set everyones health to 500") register_event("ResetHUD","reset_hud","be") } public reset_hud(id) { set_user_health(id,500) return PLUGIN_HANDLED } public setH(id) { for(new i = 0; i <= get_maxplayers;i++) { set_user_health(i,500) } return PLUGIN_HANDLED }


All times are GMT -4. The time now is 10:44.

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