Raised This Month: $51 Target: $400
 12% 

Old AMX_Super Posts.


Post New Thread Closed Thread   
 
Thread Tools Display Modes
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 02-21-2007 , 15:16   Re: Amx_Super -- Everything You Need -- v2.4 2/20
#1191

With the latest version? (2.4) As in when u upgraded or just out of the blue?
__________________
bmann_420 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-21-2007 , 16:55   Re: Amx_Super -- Everything You Need -- v2.4 2/20
#1192

hey would it be possible to do something like this?
Code:
if ( case 11 )
    {
    new pName[32]
    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s a glock.",name2,pName)
    }

else if ( case 12 )
    {
    new pName[32]
    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s, a usp.",name2,pName)
    }
thats my idea i dont care if its a lot of coding involved
but im interested to see if that would work.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 02-21-2007 , 17:57   Re: Amx_Super -- Everything You Need -- v2.4 2/20
#1193

Yes I believe so, you would answer that questions faster than I could by doing it and testing it

I cant justify the effort in just doing all those lines for a weapon name, but feel free.

YOu dont need to put new PName[32] on every line i dont belive. Just try it out and test it
__________________
bmann_420 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-21-2007 , 19:45   Re: Amx_Super -- Everything You Need -- v2.4 2/20
#1194

do i add more like this?

Code:
if ( case 11 )
    {
    new pName[32]
    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s a glock.",name2,pName)
    }

else if ( case 12 )
    {
    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s a usp.",name2,pName)
    }

else if ( case 13 )
    {
    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s a p228.",name2,pName)
    }
etc. etc...
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 02-21-2007 , 20:02   Re: Amx_Super -- Everything You Need -- v2.5 2/21
#1195

well you add them and test them. I have been out for a while and just got back into it, somewhat. You have a better job at doing it, then trying to compile and once it compiles, test it.
__________________
bmann_420 is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 02-22-2007 , 18:03   Re: Amx_Super -- Everything You Need -- v2.5 2/21
#1196

I didn't look at the actual code at all, but here's what it should look a little more like.

Code:
new pName[32]
switch(case)
{
	case 11: {
		client_print(0, print_chat, "[AMXX] ADMIN, %s, gave %s a glock.", name2, pName)
	}
	case 12: {
		client_print(0, print_chat, "[AMXX] ADMIN, %s, gave %s a usp.", name2, pName)
	}
}
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 02-22-2007 , 19:44   Re: Amx_Super -- Everything You Need -- v2.5 2/21
#1197

There he is
__________________
bmann_420 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-22-2007 , 19:50   Re: Amx_Super -- Everything You Need -- v2.5 2/21
#1198

thanks.
the "else if"s didnt work so i was thinking of making it switch but i didnt know how.
thanks.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-22-2007 , 22:13   Re: Amx_Super -- Everything You Need -- v2.5 2/21
#1199

switch (weapon)
is what it should be
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 02-23-2007 at 15:45. Reason: not spamming
Exolent[jNr] is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-23-2007 , 19:04   Re: Amx_Super -- Everything You Need -- v2.5 2/21
#1200

i need to get the admin's name for amx_armor's client_print.
the name doesnt show up. its just a blank.
what shows up when i give myself 100 armor is:
Quote:
[AMXX] ADMIN, , gave |tA| Exolent [Leader] 100 armor.
here's the armor code:
Code:
public admin_armor(id) {
    if (!(get_user_flags(id)&ADMIN_LEVEL_A)){
        client_print(id,print_console,"[AMXX] You have no access to that command")
        return PLUGIN_HANDLED
    }
    if (read_argc() <2) {
        client_print(id,print_console,"[AMXX] Usage:  amx_armor <part of nick> <amount> ")
        return PLUGIN_HANDLED
    }
    new activity = get_cvar_num("amx_show_activity")
    new name[32]
    new amount[33]
    get_user_name(id,name,32)
    read_argv(1,name,32)
    read_argv(2,amount,32)
    new toarmor = find_player("bl",name)
    if (toarmor)    {
        if (is_user_alive(toarmor)==0)    {
            client_print(id,print_console,"[AMXX] Client ^"%s^" is dead, armor is useless",name)
            return PLUGIN_HANDLED
        }
        if (str_to_num(amount) > 100){
            client_print(id,print_console,"[AMXX] Clients cannot be given more than 100 armor!")
            return PLUGIN_HANDLED
        }
        switch(activity)    {
            case 1:{
                new name[32]
                get_user_name(id,name,32)
                new numamount = str_to_num(amount)
                set_user_armor(toarmor,numamount)
                client_print(0,print_chat,"[AMXX] ADMIN gave %s %d armor.",name,numamount)
            }
            case 2:{
                new name2[32]
                new name[32]
                get_user_name(id,name,32)
                new numamount = str_to_num(amount)
                set_user_armor(toarmor,numamount)
                client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s %d armor.",name2,name,numamount)
            }
        }
        return PLUGIN_HANDLED
    }
    else {
        client_print(id,print_console,"[AMXX] Client with that part of nick not found")
        return PLUGIN_HANDLED
    }
    
    return PLUGIN_CONTINUE
}
and the hp for the person doesn't work.
i took the newest 2.5's code and switched it up a little with the admin's name and such.
here's what shows up when i give myself any number of hp:
Quote:
[AMXX] ADMIN, |tA| Exolent [Leader], gave |tA| Exolent [Leader] 0 hp.
here's the code
Code:
public admin_heal(id,level,cid){
    if (!cmd_access(id,level,cid,3))
        return PLUGIN_HANDLED
    
    new arg[32], arg2[8], name2[32], amount[33]
    read_argv(1,arg,31)
    read_argv(2,arg2,7)
    read_argv(3,amount,32)
    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) {
            new user_health = get_user_health(players[a])
            set_user_health(players[a], str_to_num(arg2) + user_health)
        }
        switch(get_cvar_num("amx_show_activity"))    {
            case 2:    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave all %ss %i hp.",name2,arg[1],amount)
            case 1:    client_print(0,print_chat,"[AMXX] ADMIN gave all %ss %i hp.",arg[1],amount)
        }
        console_print(id,"[AMXX] All clients have set life")
        log_amx("ADMIN HEAL - this command was issued by %s on all %s",name2,arg[1])
    }
    else {
        new numamount = str_to_num(amount)
        new player = cmd_target(id,arg,7)
        if (!player) return PLUGIN_HANDLED
        new user_health = get_user_health(player)
        set_user_health(player, str_to_num(arg2) + user_health + numamount)
        new name[32]
        get_user_name(player,name,31)
        switch(get_cvar_num("amx_show_activity"))    {
            case 2:    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s %i hp.",name2,name,amount)
            case 1:    client_print(0,print_chat,"[AMXX] ADMIN gave %s %i hp.",name,amount)
        }
        console_print(id,"[AMXX] Client ^"%s^" has set life",name)
        log_amx("ADMIN HEAL - this command was issued by %s on %s",name2,name)
    }
    return PLUGIN_HANDLED
}
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Closed Thread



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 15:45.


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