buy xp
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
buy xp
Hey, can someone make a plugin with ability buying XP for coins?
For example:
pay 1000 coins - 700 exp
5000 coins - 4000 exp
10000 coins - 9000 exp
For example:
pay 1000 coins - 700 exp
5000 coins - 4000 exp
10000 coins - 9000 exp
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Code: Select all
#include <zombie_escape>
#include <ze_levels>
new g_iItems[3]
public plugin_init()
{
register_plugin("[ZE] Extra: Buy XP", "1.0", "Jack GamePlay")
g_iItems[0] = ze_register_item("1000 EC -> 700 XP", 1000, 0)
g_iItems[1] = ze_register_item("5000 EC -> 4000 XP", 5000, 0)
g_iItems[2] = ze_register_item("10000 EC -> 9000 XP", 10000, 0)
}
public ze_select_item_pre(id, itemid)
{
if (itemid != g_iItems[0] || itemid != g_iItems[1] || itemid != g_iItems[2])
return ZE_ITEM_AVAILABLE
return ZE_ITEM_AVAILABLE
}
public ze_select_item_post(id, itemid)
{
if (itemid == g_iItems[0])
{
ze_set_user_xp(id, ze_get_user_xp(id) + 700)
}
else if (itemid == g_iItems[1])
{
ze_set_user_xp(id, ze_get_user_xp(id) + 4000)
}
else if (itemid == g_iItems[2])
{
ze_set_user_xp(id, ze_get_user_xp(id) + 9000)
}
}
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
how to buy this in game? can you make a command like /getxp or something and after that I have menu with those 3 options?
Looks like they should be in your extra items list.czirimbolo wrote: ↑5 years ago how to buy this in game? can you make a command like /getxp or something and after that I have menu with those 3 options?
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
This will be in extra items menu.czirimbolo wrote: ↑5 years ago how to buy this in game? can you make a command like /getxp or something and after that I have menu with those 3 options?
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
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 12 guests