Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <money>
- #include <zombieplague>
- #include <fun>
- native zp_get_user_exp(id)
- native zp_set_user_exp(id, value)
- native get_user_point(id)
- native set_user_point(id, value)
- new count[33]
- public plugin_init()
- {
- register_plugin("VIP Menu", "2.0", "S3xTy")
- register_clcmd("vipmenu", "vipmenu", ADMIN_ALL, "vipmenu");
- count[0] = 0 // reset buy count for all players
- }
- public vipmenu( id )
- {
- if(!(get_user_flags(id) & ADMIN_LEVEL_A))
- {
- ChatColor(id, "!y[!gDarkCSO!y] You have no access to use the !gVip Menu");
- return PLUGIN_HANDLED
- }
- if(!is_user_alive(id) || zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_nemesis(id) || cs_get_user_team(id)==CS_TEAM_SPECTATOR)
- {
- ChatColor(id, "!y[!gDarkCSO!y] !tThis function !yis only valid when you are !gHuman!y/!gAlive")
- }
- else
- {
- new menu = menu_create( "\d-\r[\yDarkCSO\r]\d- | \wVip Weapons", "menu_handler" );
- {
- menu_additem( menu, "\r+ \w75.000 \r$", "", 0 );
- }
- {
- menu_additem( menu, "\r+ \w150 \rPoints", "", 0 );
- }
- {
- menu_additem( menu, "\r+ \w250 \rExp", "", 0 );
- }
- {
- menu_additem( menu, "\r+ \w250 \rHP", "", 0 );
- }
- {
- menu_additem( menu, "\r+ \w150 \rAP", "", 0 );
- }
- menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
- menu_display( id, menu, 0 );
- }
- return PLUGIN_HANDLED;
- }
- public menu_handler( id, menu, item )
- {
- switch( item )
- {
- case 0:
- {
- new money = zp_cs_get_user_money(id)
- if (count[id] >= 1) // change 1 to your max purchase per map
- {
- ChatColor(id, "!y[!gDarkCSO!y] You can buy this item only 1 times per map")
- return PLUGIN_HANDLED;
- }
- else
- {
- zp_cs_set_user_money(id, money + 75000)
- }
- }
- case 1:
- {
- new points = get_user_point(id)
- if (count[id] >= 1) // change 1 to your max purchase per map
- {
- ChatColor(id, "!y[!gDarkCSO!y] You can buy this item only 1 times per map")
- return PLUGIN_HANDLED;
- }
- else
- {
- set_user_point(id, points + 150)
- }
- }
- case 2:
- {
- new exp = zp_get_user_exp(id)
- if (count[id] >= 1) // change 1 to your max purchase per map
- {
- ChatColor(id, "!y[!gDarkCSO!y] You can buy this item only 1 times per map")
- return PLUGIN_HANDLED;
- }
- else
- {
- zp_set_user_exp(id, exp + 250)
- }
- }
- case 3:
- {
- new hp = get_user_health(id)
- if (count[id] >= 1) // change 1 to your max purchase per map
- {
- ChatColor(id, "!y[!gDarkCSO!y] You can buy this item only 1 times per map")
- return PLUGIN_HANDLED;
- }
- else
- {
- set_user_health(id, hp + 250)
- }
- }
- case 4:
- {
- new ap = get_user_armor(id)
- if (count[id] >= 1) // change 1 to your max purchase per map
- {
- ChatColor(id, "!y[!gDarkCSO!y] You can buy this item only 1 times per map")
- return PLUGIN_HANDLED;
- }
- else
- {
- set_user_armor(id, ap + 150)
- }
- }
- }
- menu_destroy( menu );
- return PLUGIN_HANDLED;
- }
- // Stock: ChatColor!
- stock ChatColor(const id, const input[], any:...)
- {
- new count = 1, players[32]
- static msg[191]
- vformat(msg, 190, input, 3)
- replace_all(msg, 190, "!g", "^4") // Green Color
- replace_all(msg, 190, "!y", "^1") // Default Color
- replace_all(msg, 190, "!t", "^3") // Team Color
- replace_all(msg, 190, "!t2", "^0") // Team2 Color
- if (id) players[0] = id; else get_players(players, count, "ch")
- {
- for (new i = 0; i < count; i++)
- {
- if (is_user_connected(players[i]))
- {
- message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
- write_byte(players[i]);
- write_string(msg);
- message_end();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement