Approved VIP System

Gameplay Addons
User avatar
Jack GamePlay
Mod Developer
Mod Developer
Egypt
Posts: 576
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 47 times
Age: 19
Contact:

Re: VIP System

#51

Post by Jack GamePlay » 2 Years Ago

Spir0x wrote:
2 Years Ago
Jack what's this ? ••• Offline a year due to studying. ••• xD remove it you cant stay 1hour without opening this forum
I should put this signature on 1/8 but i will forget doing that so that i did it early.
I rarely will open the forum later.
Not interested in CS/Pawn anymore.
Accepting web projects.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 620
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#52

Post by Spir0x » 2 Years Ago

ok hope you a nice year of studying :) xD i have 2 years working hard and make my money :p
I trynna make money, not friends.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1873
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 101 times
Age: 21
Contact:

#53

Post by Raheem » 2 Years Ago

Jack GamePlay wrote:
2 Years Ago
Use "ze_user_humanized" better.
Good one, Will do it and remove all these checks.
Spir0x wrote:
2 Years Ago
Raheem i think in next update you need to put 2x fire nades & 2 frost nades for VIP.
These things won't be on the official plugin it's just other plugins. So this code supposed to do what you need:
    1. #include <ze_vip>
    2.  
    3. public plugin_init()
    4. {
    5.     register_plugin("Give M249 for VIP", "1.0", "Raheem")
    6. }
    7.  
    8. public ze_user_humanized(id)
    9. {
    10.     // Not Admin? Exit the function...
    11.     if (!(ze_get_vip_flags(id) & VIP_A))
    12.         return
    13.    
    14.     // Give M249
    15.     rg_give_item(id, "weapon_m249", GT_APPEND)
    16.     rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200)
    17.    
    18.     // Give x2 Fire Nades
    19.     rg_give_item(id, "weapon_hegrenade", GT_APPEND)
    20.     rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade")) + 1)
    21.    
    22.     // Give x2 Frost Nades
    23.     rg_give_item(id, "weapon_smokegrenade", GT_APPEND)
    24.     rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_smokegrenade"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_smokegrenade")) + 1)
    25. }
You don't know? Learn and you will know.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 620
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#54

Post by Spir0x » 2 Years Ago

Ok,then raheem usually keep testing your codes, final code.

Code: Select all

#include <ze_vip>
 
public plugin_init()
{
    register_plugin("VIP Features", "1.0", "Raheem")
}
 
public ze_user_humanized(id)
{
    // Not Admin? Exit the function...
    if (!is_user_alive(id) || !(ze_get_vip_flags(id) & VIP_A) || ze_is_user_zombie(id))
        return
   
    // Give M249
    rg_give_item(id, "weapon_m249", GT_APPEND)
    rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200)
   
    // Give x2 Fire Nades
    rg_give_item(id, "weapon_hegrenade", GT_APPEND)
    rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade")) + 1)
   
    // Give x2 Frost Nades
    rg_give_item(id, "weapon_flashbang", GT_APPEND)
    rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang")) + 1)
}
I trynna make money, not friends.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1873
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 101 times
Age: 21
Contact:

#55

Post by Raheem » 2 Years Ago

!is_user_alive(id) and ze_is_user_zombie(id) checks not needed anymore.
You don't know? Learn and you will know.

johnnysins2000
Veteran Member
Veteran Member
Pakistan
Posts: 672
Joined: 2 Years Ago
Location: Lahore
Has thanked: 11 times
Been thanked: 10 times
Age: 22
Contact:

#56

Post by johnnysins2000 » 2 Years Ago

rg_give_item?

Nice I will do this thing in main ze vip system
Nobody Is That Busy If They Make Time :roll:

User avatar
konno
Member
Member
Brazil
Posts: 44
Joined: 1 Year Ago
Location: Brazil
Has thanked: 2 times
Been thanked: 1 time
Age: 27
Contact:

#57

Post by konno » 1 Year Ago

Raheem wrote:
2 Years Ago
VIP System

Description:
  • VIP system for our Zombie Escape Mod, With this plugin you can make VIPs. This system now have:
    1. MultiJump
    2. Parachute
    3. Free Hours - Time All players will became VIPs
    4. Connect & Contact Messages
    5. Scoreboard Tag
Cvars:
  • ze_connect_message 1 Show chat notice Message When VIP Connected? 1 = Show | 0 = Don't Show
  • ze_admin_contact "Admin Name" Add your name or any contact method. To disable this change "Admin Name" to ""
  • ze_give_vip_multijump 1 Enable or Disable MultiJump for VIPs? 1 = Enable | 0 = Disable
  • ze_show_vip_scoreboard 1 Show VIP in the Score Board? 1 = Show | 0 = Don't Show
  • ze_give_vip_parachute 1 Enable or Disable Parachute for VIPs? 1 = Enable | 0 = Disable
  • ze_enable_happy_hours 1 Enable or Disable Happy Hours? 1 = Enable | 0 = Disable
  • ze_happy_hours_start 9 Happy hours start at?
  • ze_happy_hours_end 12 Happy hours end at?
  • ze_happy_hours_vip_flags "abcd" Flags to give to all players in Happy Hours?

Natives:
  • ze_get_vip_flags(id) This will return player flags as a bitflag sum. id is player index.
  • ze_set_vip_flags(id, iFlags) Set player flags. id is player index and iFlags is flags to give as bitflag sum.

Commands:
  • say /vip OR say_team /vip Show Online VIPs and Contact Message.
  • say /vips OR say_team /vips Show Online VIPs and Contact Message.
  • say /getvip OR say_team /getvip Show Motd about VIP.

Examples & Instructions:
  • VIPs are set in ze_vips.ini in configs folder. There is flags and every flag give the player ability so default flags is:
    1. a -- Connect Message and VIP List
    2. b -- Multi-Jump
    3. c -- Parachute
    4. d -- Scoreboard Attrib.
  • Making VIPs Syntax: "Steam/Nick" "Password" "Flags"
  • Some Examples:
    1. "STEAM_1:0:1442018137" "550" "abcd" - This VIP will get all flags and will be able to use all of them.
    2. "Raheem" "EscapersZone" "ab" - This VIP will get only Connect Message and VIP List and Multi-Jump.
  • Player can set the password normally from setinfo same as normal admin.
  • ze_happy_hours_vip_flags "Flags" Will define when happy hours come what flags to be given for all players?
  • You can change all cvars easily from ze_vip.cfg
  • You need to install MultiJump and Parachute So that VIP system works correctly. Recommended Cvar:
    1. ze_give_all_multijump 0
    2. ze_give_all_parachute 0
  • Don't forget to edit motd file ze_vip.txt and set your information there.
  • Happy hours start and end time is depend on server time and server time depend on the machine which your server hosted on. Say thetime to get your server time inside the game.
Can you add discounts for VIP players when buying extra items?
  • ze_get_vip_flags(id) Use it same as you use get_user_flags() Find flags in ze_vip.inc you can also add more flags as you need. Flag z mean this is normal player not vip.
  • ze_set_vip_flags(id, iFlags) This native will set flags you give to player at the spawn and these flags will be removed at the end of the round. This not need password you can use in awards plugins and so on. iFlags is the flag in this format: VIP_A, VIP_B .... Some examples:
    1. ze_set_vip_flags(id, VIP_A) This will set to the player Flag a only.
    2. ze_set_vip_flags(id, VIP_A|VIP_B) This will set to player flags a and b.
    3. ze_set_vip_flags(id, VIP_A|VIP_B|VIP_C|VIP_D) This will set to the players all the flags abcd
  • In set vip flags native we can make things easy and you can set player flags like:
    1. ze_set_vip_flags(id, read_flags("a")) This will give player flag a
    2. ze_set_vip_flags(id, read_flags("abc")) This will give the player flags abc the three flags.

Changelog:
  • Spoiler!
    Version: 1.0
    • First Release.
    Version: 1.1 [Current Version]
    • Added contact message and say /vip to show all online VIPs.
    • Added new motd for VIP say /getvip.
    • Added Parachute.
    • Added new two natives
    • Added New flags now used rather than old ones used in users.ini the new file is ze_vip.ini
    • Added new config file for VIP system ze_vip.cfg
    • Added support with name & steamid in VIP system.
    • Added cvar to know servers running our vip system: ze_vip_version

Downloads:
  • Zombie Escape VIP.zip

User avatar
konno
Member
Member
Brazil
Posts: 44
Joined: 1 Year Ago
Location: Brazil
Has thanked: 2 times
Been thanked: 1 time
Age: 27
Contact:

#58

Post by konno » 1 Year Ago

Can you add 50% discount to VIPs when buying extra items?

User avatar
konno
Member
Member
Brazil
Posts: 44
Joined: 1 Year Ago
Location: Brazil
Has thanked: 2 times
Been thanked: 1 time
Age: 27
Contact:

#59

Post by konno » 1 Year Ago

Raheem wrote:
2 Years Ago
Here it's:
    1. #include <ze_vip>
    2.  
    3. public plugin_init()
    4. {
    5.     register_plugin("Give M249 for VIP", "1.0", "Raheem")
    6.    
    7.     RegisterHookChain(RG_CBasePlayer_Spawn, "Fw_PlayerSpawn_Post", 1)
    8. }
    9.  
    10. public Fw_PlayerSpawn_Post(id)
    11. {
    12.     if (!is_user_alive(id) || !(ze_get_vip_flags(id) & VIP_A) || ze_is_user_zombie(id))
    13.         return HC_CONTINUE
    14.    
    15.     rg_give_item(id, "weapon_m249", GT_APPEND)
    16.     rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200)
    17.    
    18.     return HC_CONTINUE
    19. }
not working instead of winning the items is opening the normal menu
Last edited by konno on 30 Oct 2017, 23:35, edited 1 time in total.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1873
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 101 times
Age: 21
Contact:

#60

Post by Raheem » 1 Year Ago

50% discount of the extra-item can be done in the specified items you need them to have discount for the VIP. Like after the player buy the item you may check if he is VIP then back him cost/2. Show me the item you need to add discount to it and i'll do it for you.
You don't know? Learn and you will know.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest