Solved Black buying extra items in freeze Time

Unpaid Requests, Public Plugins
Post Reply
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

Black buying extra items in freeze Time

#1

Post by czirimbolo » 5 years ago

Hey I would like to block buying extra items in freeze time but only for zombies. Can someone help me?
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#2

Post by Raheem » 5 years ago

This will block zombies from buying items while in the pre-release time (Frozen):
    1. #include <zombie_escape>
    2.  
    3. new bool:g_bCanBuy
    4.  
    5. public plugin_init()
    6. {
    7.     register_plugin("Block Buy", "1.0", "Raheem")
    8. }
    9.  
    10. public ze_zombie_appear()
    11. {
    12.     g_bCanBuy = false;
    13. }
    14.  
    15. public ze_zombie_release()
    16. {
    17.     g_bCanBuy = true;
    18. }
    19.  
    20. public ze_select_item_pre(id, itemid)
    21. {
    22.     if (ze_is_user_zombie(id) && !g_bCanBuy)
    23.         return ZE_ITEM_UNAVAILABLE
    24.    
    25.     return ZE_ITEM_AVAILABLE
    26. }
He who fails to plan is planning to fail

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#3

Post by czirimbolo » 5 years ago

Its working, thanks Raheem
Image

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest