Raised This Month: $32 Target: $400
 8% 

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-19-2007 , 21:41   Re: Amx_Super -- Everything You Need -- v2.2 1/7
#1181

@X-olent

amx_heal showing how much hp is delt, hopeully. Test and let me know. I did not do any of the weapon command stuff as before, its fresh off the front page with just the heal don. You can finsih it if itworks and get experience
Attached Files
File Type: sma Get Plugin or Get Source (amx_super.sma - 498 views - 102.4 KB)
__________________
bmann_420 is offline
st0ned
Member
Join Date: Dec 2006
Location: Somewhere
Old 02-20-2007 , 07:08   Re: Amx_Super -- Everything You Need -- v2.2 1/7
#1182

Well it compiled without errors.Ima go and try test it as soon as I can.As I checked: you added an admin flag check function and the amx usage argument.I dont really get it how it will help but still,im gonna post the results
__________________
My grandmother is cooler than you o_O
st0ned is offline
Send a message via Skype™ to st0ned
st0ned
Member
Join Date: Dec 2006
Location: Somewhere
Old 02-20-2007 , 13:30   Re: Amx_Super -- Everything You Need -- v2.2 1/7
#1183

Sorry bmann it didnt work.I figure it wouldnt cuz u just added an admin_check flag function and an amx usage function Can u try out other stuff?
__________________
My grandmother is cooler than you o_O
st0ned is offline
Send a message via Skype™ to st0ned
st0ned
Member
Join Date: Dec 2006
Location: Somewhere
Old 02-20-2007 , 15:19   Re: Amx_Super -- Everything You Need -- v2.2 1/7
#1184

Hey bman.Dont bother with the admin immunity removing.I figured out myself.IM gonna go and try and get the rgb glow function now.Peace out (btw if you want ill put the sma)
__________________
My grandmother is cooler than you o_O
st0ned is offline
Send a message via Skype™ to st0ned
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-20-2007 , 16:23   Re: Amx_Super -- Everything You Need -- v2.2 1/7
#1185

bmann, say i want to make it show how much money is given or taken, would this be correct?

Code:
public give_money(id,level,cid){
    if (!cmd_access(id,level,cid,3)){
        return PLUGIN_HANDLED
    }
    new arg1[32], arg2[8], name2[32]
    read_argv(1,arg1,31)
    read_argv(2,arg2,7)
    new adminname[32]
    
    new player = cmd_target(id,arg1,2)
    if (!player) return PLUGIN_HANDLED
    
    get_user_name(player,name2,31)
    
    if ((cs_get_user_money(player) + str_to_num(arg2)) > 16000)
        {
        new numamount = str_to_num(amount)
        cs_set_user_money(player,16000,1)
        if(get_cvar_num("amx_moneymsg") == 1)
            {
            client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s %i dollars.",adminname,name2,numamount)
            return PLUGIN_HANDLED
    }
    else {
        new numamount = str_to_num(amount)
        cs_set_user_money(player,cs_get_user_money(player) + str_to_num(arg2),1)
        if(get_cvar_num("amx_moneymsg") == 1)
            {
            client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s %i dollars.",adminname,name2,numamount)
            return PLUGIN_HANDLED
    }
    get_user_name(id,adminname,31)
    log_amx("ADMIN GIVE MONEY - this command was issued by %s. Admin gave money to %s",adminname,name2)
    return PLUGIN_HANDLED
}
public take_money(id,level,cid){
    if (!cmd_access(id,level,cid,3)){
        return PLUGIN_HANDLED
    }
    
    new arg1[32], arg2[8], name2[32]
    read_argv(1,arg1,31)
    read_argv(2,arg2,7)
    new adminname[32]
    
    new player = cmd_target(id,arg1,1)
    if (!player) return PLUGIN_HANDLED
    
    get_user_name(player,name2,31)
    
    if ((cs_get_user_money(player) - str_to_num(arg2)) <= 0)
        {
        cs_set_user_money(player,0,1)
        if(get_cvar_num("amx_moneymsg") == 1)
            {
            client_print(0,print_chat,"[AMXX] ADMIN, %s, took all money from %s.",adminname,name2)
            return PLUGIN_HANDLED
        }
        client_print(id,print_chat,"[AMXX] ADMIN, %s, took all money from %s.",adminname,name2)
    }
    else
    {
        new numamount = str_to_num(amount)
        cs_set_user_money(player,cs_get_user_money(player) - str_to_num(arg2),1)
        if(get_cvar_num("amx_moneymsg") == 1)
            {
            client_print(0,print_chat,"[AMXX] ADMIN, %s, took %i dollars from %s",adminname,numamount,name2)
            return PLUGIN_HANDLED
        }
    }
    get_user_name(id,adminname,31)
    log_amx("ADMIN GIVE MONEY - this command was issued by %s. Admin took money from %s",adminname,name2)
    return PLUGIN_HANDLED
}
__________________
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-20-2007 , 18:04   Re: Amx_Super -- Everything You Need -- v2.2 1/7
#1186

This is Avalanche's code.
Code:
 public cmd_givemoney(id,level,cid)
 {
	// no access
	if(!cmd_access(id,level,cid,3))
		return PLUGIN_HANDLED;

	// grab arguments
	new arg[32], arg2[32];
	read_argv(1,arg,32);
	read_argv(2,arg2,31);

	// get player and validate
	new player = cmd_target(id,arg,2);
	if(!player) return PLUGIN_HANDLED;

	// get money and set it
	new amount = str_to_num(arg2);
	cs_set_user_money(player,cs_get_user_money(player)+amount);

	// get names
	new playerName[32], adminName[32];
	get_user_name(player,playerName,31);
	get_user_name(id,adminName,31);

	// get authids for log
	new playerAuthid[32], adminAuthid[32];
	get_user_authid(player,playerAuthid,31);
	get_user_authid(id,adminAuthid,31);

	log_amx("Give Money: ^"%s<%d><%s><>^" gave ^"%s<%d><%s><>^" $%i",adminName,get_user_userid(id),adminAuthid,playerName,get_user_userid(player),playerAuthid,amount);

	switch(get_cvar_num("amx_show_activity"))
	{
		case 2: client_print(0,print_chat,"ADMIN %s: give %s $%i",adminName,playerName,amount);
		case 1: client_print(0,print_chat,"ADMIN: give %s $%i",playerName,amount);
	}

	console_print(id,"* Gave %s $%i",playerName,amount);

	return PLUGIN_HANDLED;
 }
Then at the top of the plugin replace:
Code:
register_concmd("amx_givemoney","give_money",ADMIN_LEVEL_A,"<nick> OR <#userid> <amount>")
With

Code:
register_clcmd("amx_givemoney","cmd_givemoney",ADMIN_KICK,"<player> <amount> - gives specified player money");
__________________
bmann_420 is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 02-20-2007 , 21:00   Re: Amx_Super -- Everything You Need -- v2.4 2/20
#1187

Updated to 2.4

I tried using the Indenter in the AMX Studio and I still get 9 indent errors. So, it would be endless if I tried doin it again myself.

Link to the changelog is on the front page
__________________
bmann_420 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-20-2007 , 21:56   Re: Amx_Super -- Everything You Need -- v2.4 2/20
#1188

yo i got the money working and the healing working and the weapons working.
i just want to go further. =)
i was wondering two things:
  • how do you make the amount of heal given work?
    i tried giving myself 100 hp and of course i had 200 hp but the client print said 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 %s %i hp.",name2,arg[1],numamount)
            case 1:    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s %i hp.",name2,arg[1],numamount)
        }
        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) // Turn the string into a number
        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)
        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,numamount)
            case 1:    client_print(0,print_chat,"[AMXX] ADMIN, %s, gave %s %i hp.",name2,name,numamount)
        }
        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
}
  • the second thing i was thinking about was how do u substitute the number in amx_weapon when it prints to say the weapon?
    i just want it to still have "amx_weapon ##" format but when it prints,
    i want it to say the weapon instead of the number because most people dont know the numbers.
__________________
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 , 01:01   Re: Amx_Super -- Everything You Need -- v2.4 2/20
#1189

Answer to your first question is fixed on teh front page. It shows how much hp you have now.

To your second one about the weapon number converted to name. No Idea. Dont care that much, if you find out then thats cool, but I really dont need or mind it, either way

Read the changelog

The weapon command will log into the consol always. I have weapon bindings with 1 key i issue the command 6 times (weather it be the ak, m4, scout, awp key that comes with everything) See more about it here. So I would never have it echo into the client_print. If you want it to echo into the client print, then you can use the one we've been workin on or this one. Updated with the weapon command loggin into client_print
Attached Files
File Type: sma Get Plugin or Get Source (amx_super1.sma - 574 views - 100.6 KB)
__________________

Last edited by bmann_420; 02-21-2007 at 01:14.
bmann_420 is offline
st0ned
Member
Join Date: Dec 2006
Location: Somewhere
Old 02-21-2007 , 12:30   Re: Amx_Super -- Everything You Need -- v2.4 2/20
#1190

Hey bmann.I got a new problem.My uberslap comand isnt working.Do you know what the problem might be?It used to work but now it just stopped
__________________
My grandmother is cooler than you o_O
st0ned is offline
Send a message via Skype™ to st0ned
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 23:04.


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