Forget it.
VIP System
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Here it's:
- #include <ze_vip>
- public plugin_init()
- {
- register_plugin("Give M249 for VIP", "1.0", "Raheem")
- RegisterHookChain(RG_CBasePlayer_Spawn, "Fw_PlayerSpawn_Post", 1)
- }
- public Fw_PlayerSpawn_Post(id)
- {
- if (!is_user_alive(id) || !(ze_get_vip_flags(id) & VIP_A) || ze_is_user_zombie(id))
- return HC_CONTINUE
- rg_give_item(id, "weapon_m249", GT_APPEND)
- rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200)
- return HC_CONTINUE
- }
He who fails to plan is planning to fail
[mention]Jack GamePlay[/mention] what's your probleme ?
Raheem xD when i'm infected to zombie i have m249 and i can infect humans with gun
Fixed see the code now.
He who fails to plan is planning to fail
thanks.
raheem can you put models into this m249 ? and give automatic m249 and deagle.
Raheem i think in next update you need to put 2x fire nades & 2 frost nades for VIP.
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Use "ze_user_humanized" better.
Jack what's this ? ••• Offline a year due to studying. ••• xD remove it you cant stay 1hour without opening this forum
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
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.
ok hope you a nice year of studying xD i have 2 years working hard and make my money :p
Good one, Will do it and remove all these checks.
These things won't be on the official plugin it's just other plugins. So this code supposed to do what you need:
- #include <ze_vip>
- public plugin_init()
- {
- register_plugin("Give M249 for VIP", "1.0", "Raheem")
- }
- public ze_user_humanized(id)
- {
- // Not Admin? Exit the function...
- if (!(ze_get_vip_flags(id) & VIP_A))
- 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_smokegrenade", GT_APPEND)
- rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_smokegrenade"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_smokegrenade")) + 1)
- }
He who fails to plan is planning to fail
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)
}
!is_user_alive(id) and ze_is_user_zombie(id) checks not needed anymore.
He who fails to plan is planning to fail
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
rg_give_item?
Nice I will do this thing in main ze vip system
Nice I will do this thing in main ze vip system
Nobody Is That Busy If They Make Time
Raheem wrote: ↑7 years agoVIP System
Description:
[list]VIP system for our Zombie Escape Mod, With this plugin you can make VIPs. This system now have:
[/list]Cvars:
- MultiJump
- Parachute
- Free Hours - Time All players will became VIPs
- Connect & Contact Messages
- Scoreboard Tag
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
ORsay_team /vip
Show Online VIPs and Contact Message.
say /vips
ORsay_team /vips
Show Online VIPs and Contact Message.
say /getvip
ORsay_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:
- a -- Connect Message and VIP List
- b -- Multi-Jump
- c -- Parachute
- d -- Scoreboard Attrib.
- Making VIPs Syntax: "Steam/Nick" "Password" "Flags"
- Some Examples:
- "STEAM_1:0:1442018137" "550" "abcd" - This VIP will get all flags and will be able to use all of them.
- "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:
ze_give_all_multijump 0
ze_give_all_parachute 0
- Don't forget to edit motd file ze_vip.txt and set your information there.
Can you add discounts for VIP players when buying extra items?
- 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.
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:
ze_set_vip_flags(id, VIP_A)
This will set to the player Flag a only.ze_set_vip_flags(id, VIP_A|VIP_B)
This will set to player flags a and b.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:
ze_set_vip_flags(id, read_flags("a"))
This will give player flag aze_set_vip_flags(id, read_flags("abc"))
This will give the player flags abc the three flags.
Changelog:
Spoiler!
Downloads:
- Zombie Escape VIP.zip
Can you add 50% discount to VIPs when buying extra items?
not working instead of winning the items is opening the normal menuRaheem wrote: ↑6 years ago Here it's:
#include <ze_vip> public plugin_init() { register_plugin("Give M249 for VIP", "1.0", "Raheem") RegisterHookChain(RG_CBasePlayer_Spawn, "Fw_PlayerSpawn_Post", 1) } public Fw_PlayerSpawn_Post(id) { if (!is_user_alive(id) || !(ze_get_vip_flags(id) & VIP_A) || ze_is_user_zombie(id)) return HC_CONTINUE rg_give_item(id, "weapon_m249", GT_APPEND) rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200) return HC_CONTINUE }
Last edited by konno 6 years ago, edited 1 time in total.
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.
He who fails to plan is planning to fail
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
Sign in
Who is online
Users browsing this forum: No registered users and 1 guest