AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ultimate ammo (https://forums.alliedmods.net/showthread.php?t=172546)

KamiN 11-22-2011 11:26

Ultimate ammo
 
How to give a gun for somebody with ultimate ammo (reload needed)?

Erox902 11-22-2011 11:43

Re: Ultimate ammo
 
What is ultimate ammo? :?
Anyways, give gun give_item()
Give ammo (in clip) cs_set_weapon_ammo()
Give ammo (in backpack) cs_set_user_bp_ammo()

KamiN 11-22-2011 11:48

Re: Ultimate ammo
 
I want to make unlimited this http://ikelk.lt/storage/images/000/0...iginal_img.png Like in CSDM, when u shout your backpack never ends.

joshknifer 11-22-2011 12:49

Re: Ultimate ammo
 
There is no picture there. Is it a custom weapon? If not, just search for Unlimited Ammo.

KamiN 11-22-2011 13:21

Re: Ultimate ammo
 
[IMG]http://img828.**************/img828/4926/originalimg.png[/IMG]

yes, its for a custom weapon.

Heres the example

Code:

public do_specialday(id)
{
.....
            case DAY_TSHLD:
            {   
                if(IsPlayer(i) && is_user_alive(i))
                {
                    switch(cs_get_user_team(i))
                    {
                        case CS_TEAM_T:
                        {
                            strip_weapons(i)

                            give_item(i, "weapon_deagle")
                            give_item(i, "weapon_shield")
                           
                            cs_set_user_bpammo(i, CSW_DEAGLE, 35)

                            if(!(pev(i, pev_flags) & FL_FROZEN))
                            {
                                client_print(i, print_center, "Jus buvote sustingdytas 6 sekundems!");
                                freeze = true
                                set_pev(i, pev_flags, (pev(i, pev_flags) | FL_FROZEN));
                                set_task(7.0, "unfreeze", TASK_unfreeze + id)
                            }
                        }
                       
                        case CS_TEAM_CT:
                        {
                            strip_weapons(i)

                            give_item(i, "weapon_deagle")
                            give_item(i, "weapon_m4a1")
                           
                            cs_set_user_bpammo(i, CSW_DEAGLE, 35)
                            cs_set_user_bpammo(i, CSW_M4A1, 90)
                        }
                    }
                }

                set_hudmessage(0, 85, 255, -1.0, 0.26, 0, 6.0, 6.0)
                show_hudmessage(0, "%s pradejo Terrorist Shield diena! Priziuretojai turi 6s pabegimui! Siuo metu zudyti negalima!", name)
               
                set_task(7.0, "specdaytxtprad", id)           
                jail_open()
            }

.....
}

I want those given guns to have unlimited ammo but only when CASE_TSHLD is active..


All times are GMT -4. The time now is 08:25.

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