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

Solved Prevent knife to be switched to grenade


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 00:57.


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