View Single Post
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 05-01-2019 , 14:30   Prevent knife to be switched to grenade
Reply With Quote #1

I use this code to give zombies grenade at spawn.
That works fine.
But what would like to change is this: when zombie gets a grenade, knife is immediately switched to grenade. How can I prevent this?
I do not want to immediately switch to the grenade.

PHP Code:
public fw_PlayerSpawn_Post(id)
{
    if(!
is_user_alive(id) || !is_user_zombie(id) || !g_firstZombieReward[id])
        return

        
set_task(5.0"give_grenade"id)
}

public 
give_grenade(id)
{    
     if(!
is_user_zombie(id) || !is_user_alive(id) || !g_firstZombieReward[id])
         return

     if(!
user_has_weapon(idCSW_SMOKEGRENADE))
     {
         
give_item(id"weapon_smokegrenade")
     }
     if(!
user_has_weapon(idCSW_FLASHBANG))
     {
         
give_item(id"weapon_flashbang")
     }

__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4

Last edited by Krtola; 06-11-2019 at 04:27. Reason: Problem is solved
Krtola is offline
Send a message via Skype™ to Krtola