Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <fun>
- #include <engine>
- #include <hamsandwich>
- #include <fakemeta>
- new g_Menu;
- new bool:g_HasSpeed[ 33 ];
- new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame;
- public plugin_init() {
- register_plugin("PredatorShop", "0.1", "Ex3cuTioN");
- g_Menu = register_menuid("Predator Shop");
- register_menucmd(g_Menu, 1023, "predatorshop");
- register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
- //register_event( "CurWeapon", "set_speed", "be" );
- RegisterHam(Ham_Spawn, "player", "Spawn", 1);
- RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Ham_ResetMaxSpeedPost", 1);
- }
- public cmdShop(id) {
- new menuBody[512];
- add(menuBody, 511, "\yPredator.Indungi.Ro Shop\w^n^n");
- add(menuBody, 511, "\r1. \wHE+2Flash (1100$)\w^n");
- add(menuBody, 511, "\r2. \wMachine Guns (5600$)\w^n");
- add(menuBody, 511, "\r3. \wViteza (5500$)\w^n");
- add(menuBody, 511, "\r4. \wGravitatie (11000$)\w^n");
- add(menuBody, 511, "\r5. \wInvizibilitate (14000$)\w^n");
- add(menuBody, 511, "\r6. \w50 HP (9000$)\w^n");
- add(menuBody, 511, "\r7. \w50 Armor (1500$)\w^n");
- add(menuBody, 511, "\r8. \w3 Kills (5000$)\w^n");
- add(menuBody, 511, "\r0. \wExit^n");
- new keys = ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<8 | 1<<9);
- show_menu(id, keys, menuBody, -1, "Predator Shop");
- }
- public predatorshop(id, key) {
- switch(key)
- {
- case 0:
- {
- new bani,banif;
- bani = cs_get_user_money(id);
- if(bani < 1100) {
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 1100$");
- return PLUGIN_HANDLED;
- }
- banif = bani - 1100;
- cs_set_user_money(id,banif);
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat!team HE!y+!team2Flash!y.",banif);
- give_item(id,"weapon_hegrenade")
- give_item(id,"weapon_flashbang");
- give_item(id,"weapon_flashbang");
- }
- case 1:
- {
- new bani,banif;
- bani = cs_get_user_money(id);
- if(bani < 5600) {
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 5600$");
- return PLUGIN_HANDLED;
- }
- banif = bani - 5600;
- cs_set_user_money(id,banif);
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !teamMachine Guns!y.",banif);
- give_item(id,"weapon_m249");
- }
- case 2:
- {
- new bani,banif;
- bani = cs_get_user_money(id);
- if(bani < 5500) {
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 5500$");
- return PLUGIN_HANDLED;
- }
- banif = bani - 5500;
- cs_set_user_money(id,banif);
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !teamViteza!y.",banif);
- g_HasSpeed[ id ] = true;
- }
- case 3:
- {
- new bani,banif;
- bani = cs_get_user_money(id);
- if(bani < 11000) {
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 11000$");
- return PLUGIN_HANDLED;
- }
- banif = bani - 11000;
- cs_set_user_money(id,banif);
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !teamGravitatie!y.",banif);
- set_user_gravity(id,0.4);
- }
- case 4:
- {
- new bani,banif;
- bani = cs_get_user_money(id);
- if(bani < 14000) {
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 14000$");
- return PLUGIN_HANDLED;
- }
- banif = bani - 14000;
- cs_set_user_money(id,banif);
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !teamInvizibilitate!y.",banif);
- set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 30);
- }
- case 5:
- {
- new bani,banif;
- bani = cs_get_user_money(id);
- if(bani < 9000) {
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 9000$");
- return PLUGIN_HANDLED;
- }
- banif = bani - 9000;
- cs_set_user_money(id,banif);
- set_user_health ( id, get_user_health ( id ) + 50 );
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !team+50 Health!y.",banif);
- }
- case 6:
- {
- new bani, banif;
- bani = cs_get_user_money(id);
- if(bani < 1500) {
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 1500$");
- return PLUGIN_HANDLED;
- }
- banif = bani - 1500;
- cs_set_user_money(id,banif);
- set_user_armor ( id, get_user_armor ( id ) + 50 );
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !team+50 Armor!y.",banif);
- }
- case 7:
- {
- new bani, banif;
- bani = cs_get_user_money(id);
- if(bani < 5000) {
- chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 5000$");
- return PLUGIN_HANDLED;
- }
- banif = bani - 5000;
- cs_set_user_money(id, banif);
- set_user_frags(id, get_user_frags(id) + 3);
- chat_color(id, "!g[Predator.Indungi.Ro]!y Ai cumparat !team+3 Kills!y.");
- }
- default: return PLUGIN_HANDLED;
- }
- return PLUGIN_HANDLED;
- }
- public removeInvis(id) {
- set_user_noclip(id,0);
- }
- /*public set_speed( id )
- {
- if ( !g_HasSpeed[ id ] )
- return 1;
- new Float:speed = get_user_maxspeed(id) + 130.0;
- set_user_maxspeed(id, speed);
- return 1;
- }*/
- public Ham_ResetMaxSpeedPost( id ) {
- if( is_user_alive( id ) && get_user_maxspeed( id ) != 1.0 ) {
- new Float:flMaxSpeed;
- if( g_HasSpeed[ id ] ) {
- flMaxSpeed = get_user_maxspeed(id) + 130.0;
- }
- if( flMaxSpeed > 0.0 ) {
- set_pev( id, pev_maxspeed, flMaxSpeed );
- }
- }
- }
- public client_connect( id ) g_HasSpeed[ id ] = false;
- public client_disconnect( id ) g_HasSpeed[ id ] = false;
- public Spawn(id) g_HasSpeed[id] = false;
- stock chat_color(const id, const input[], any:...)
- {
- new count = 1, players[32]
- static msg[191]
- vformat(msg, 190, input, 3)
- replace_all(msg, 190, "!g", "^4")
- replace_all(msg, 190, "!y", "^1")
- replace_all(msg, 190, "!team", "^3")
- 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