Descarcare:
- | Afiseaza codul
#include < amxmodx > #include < amxmisc > #include < cstrike > #include < fakemeta > #include < fun > #include < hamsandwich > #include < zombieplague > #define PLUGIN_NAME "[ZP] Point's Shop" #define PLUGIN_VERSION "1.0" #define PLUGIN_AUTHOR "londoN" native zd_set_user_points ( id, ppoints ) native zd_get_user_points ( id ) new const szTag [ ] = "ZP" new g_msgSayText new const g_File[ ] = "addons/amxmodx/configs/vips.ini" new const g_szFile [ ] = "addons/amxmodx/configs/users.ini" public plugin_init ( ) { register_plugin ( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR ) register_clcmd ( "shoppoints", "handler" ) register_forward ( FM_ClientConnect, "fw_PlayerConnect", 1 ) g_msgSayText = get_user_msgid ( "SayText" ) set_task ( 60.0, "TaskAnnounce", _, _, _, "b" ) } public TaskAnnounce ( ) { static id for ( id = 1; id < get_maxplayers ( ); id++ ) { ColorChat ( id, "!x04[%s] !x03Push !x04N!x03 to open Point's Shop", szTag ) } } public fw_PlayerConnect ( Client ) { if ( !is_user_bot ( Client ) || !is_user_hltv ( Client ) ) { client_cmd ( Client, "bind ^"n^" ^"shoppoints^"" ) } } public handler ( id ) { new menu = menu_create ( "\rNEWLIFEZM.AMICS.RO \w- \ySHOP", "shop" ) menu_additem ( menu, "\wRESPAWN [ \r15 Points \w]", "1", 0 ) menu_additem ( menu, "\w100 AMMO [ \r60 Points \w]", "2", 0 ) menu_additem ( menu, "\w200 AMMO [ \r120 Points \w]", "3", 0 ) menu_additem ( menu, "\wCOMPLETE PACK [ \r50 Points \w]", "4", 0) menu_additem ( menu, "\wGO TO HUMAN [ \r 25 Points \w]", "5", 0) menu_additem ( menu, "\wBUY VIP [ \r 2250 Points \w]", "6", 0) menu_additem ( menu, "\wBUY ADMIN [ \r4500 Points \w]", "7", 0) menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL ) menu_display ( id, menu, 0 ) } public shop ( id, menu, item ) { if ( item == MENU_EXIT ) { menu_destroy ( menu ) return PLUGIN_HANDLED; } new Points = zd_get_user_points ( id ) new szName [ 32 ] get_user_name ( id, szName, charsmax ( szName ) ) new Data[7], Name[64] new Access, Callback menu_item_getinfo(menu, item, Access, Data, 5, Name, 63, Callback) new key = str_to_num(Data) switch ( key ) { case 1 : { if ( Points < 15 ) { ColorChat ( id, "!x04[%s] !x03No Enough points", szTag ) return PLUGIN_CONTINUE; } if ( is_user_alive ( id ) ) { ColorChat ( id, "!x04[%s] !x03You are alive!", szTag ) return PLUGIN_CONTINUE; } if ( cs_get_user_team ( id ) == CS_TEAM_SPECTATOR ) { return PLUGIN_CONTINUE; } ExecuteHam ( Ham_CS_RoundRespawn, id ); ColorChat ( id, "!x04[%s] !x03You bought !x04respawn", szTag ) set_hudmessage( 127, 255, 255, 0.31, 0.75, 0, 6.0, 1.0 ) show_hudmessage( id, "%s bouth respawn!", szName ) zd_set_user_points ( id, Points - 15 ) } case 2 : { if ( Points < 60 ) { ColorChat ( id, "!x04[%s] !x03No Enought points", szTag ) return PLUGIN_CONTINUE; } zp_set_user_ammo_packs ( id, zp_get_user_ammo_packs ( id ) + 100 ) ColorChat ( id, "!x04[%s] !x03You bought !x04100 packs!", szTag ) set_hudmessage( 127, 255, 255, 0.31, 0.75, 0, 6.0, 1.0 ) show_hudmessage( id, "%s bought 100 Ammo Packs!", szName ) zd_set_user_points ( id, Points - 60 ) } case 3 : { if ( Points < 120 ) { ColorChat ( id, "!x04[%s]!x03 No enought points", szTag ) return PLUGIN_CONTINUE; } zp_set_user_ammo_packs ( id, zp_get_user_ammo_packs ( id ) + 200 ) ColorChat ( id, "!x04[%s] !x03You bought !x04200 packs!", szTag ) set_hudmessage( 127, 255, 255, 0.31, 0.75, 0, 6.0, 1.0 ) show_hudmessage( id, "%s bought 200 Ammo Packs!", szName ) zd_set_user_points ( id, Points - 120 ) } case 4 : { if ( Points < 50 ) { ColorChat ( id, "!x04[%s] !x03No enought points", szTag ) return PLUGIN_CONTINUE; } if ( zp_get_user_zombie ( id ) ) { ColorChat ( id, "!x04[%s] !x03You must be human", szTag ) return PLUGIN_CONTINUE; } strip_user_weapons ( id ) give_item ( id, "weapon_knife" ) give_item ( id, "weapon_deagle" ) give_item ( id, "weapon_ak47" ) give_item ( id, "weapon_m4a1" ) give_item ( id, "weapon_smokegrenade" ) give_item ( id, "weapon_flashbang" ) give_item ( id, "weapon_flashbang" ) give_item ( id, "weapon_hegrenade" ) cs_set_user_bpammo ( id, CSW_AK47, 90 ) cs_set_user_bpammo ( id, CSW_M4A1, 90 ) cs_set_user_bpammo ( id, CSW_DEAGLE, 90 ) set_user_health ( id, 150 ) set_user_armor ( id, 200 ) ColorChat ( id, "!x04[%s] !x03You bought !x04Complete pack!", szTag ) set_hudmessage( 127, 255, 255, 0.31, 0.75, 0, 6.0, 1.0 ) show_hudmessage( id, "%s bouth Complete Pack!", szName ) zd_set_user_points ( id, Points - 50 ) } case 5 : { if ( Points < 25 ) { ColorChat ( id, "!x04[%s]!x03 No enought points", szTag ) return PLUGIN_CONTINUE; } if ( zp_get_user_zombie ( id ) && !zp_is_survivor_round ( ) && !zp_is_nemesis_round ( ) ) { server_cmd ( "zp_human %s", szName ) ColorChat ( id, "!x04[%s]!x03 You turned to a human", szTag ) set_hudmessage( 127, 255, 255, 0.31, 0.75, 0, 6.0, 1.0 ) show_hudmessage( id, "%s turned back to a human!", szName ) zd_set_user_points ( id, Points - 25 ) } } case 6 : { if ( Points < 2250 ) { ColorChat ( id, "!x04[%s]!x03 No enought points", szTag ) return PLUGIN_CONTINUE; } new r [ 5 ] formatex ( r, charsmax ( r ), "%c%c%c", random_num('a', 'z'), random_num('0', '5'), random_num('b', 'h')) new szBuffer [ 512 ]; formatex ( szBuffer, charsmax ( szBuffer ), " ^"%s^" ^"%s^" ^"abde^" ^"ab^"", szName, r ); write_file ( g_File, szBuffer ) ColorChat ( id, "!x04[%s] !x03You bought !x04VIP!x03!", szTag ) ColorChat ( id, "!x04[%s] !x03Your Name: !x04%s!x03 | Your Password: !x04: %s", szTag, szName, r ) ColorChat ( id, "!x04[%s] !x03At map change !x04VIP !x03will be active", szTag ) zd_set_user_points ( id, Points - 2250 ) } case 7 : { if ( Points < 4500 ) { ColorChat ( id, "!x04[%s]!x03 No enought points", szTag ) return PLUGIN_CONTINUE; } new a [ 5 ] formatex ( a, charsmax ( a ), "%c%c%c", random_num ( 'A', 'Z' ), random_num ( 'a', 'z' ), random_num ( '0', '9' ) ) new szBuffer [ 512 ]; formatex ( szBuffer, charsmax ( szBuffer ), "^"%s^" ^"%s^" ^"bcefghi^" ^"a^"", szName, a ); write_file ( g_szFile, szBuffer ) ColorChat ( id, "!x04[%s] !x03You bought !x04ADMIN!x03!", szTag ) ColorChat ( id, "!x04[%s] !x03You Name: !x04%s !x03| Your Password: !x04%s", szTag, szName, a ) ColorChat ( id, "!x04[%s] !x03At map change !x04ADMIN !x03will be active", szTag ) zd_set_user_points ( id, Points - 4500 ) } } return PLUGIN_HANDLED; } stock ColorChat(const id, const input[], any:...) { new count = 1, players[32]; static msg[191]; vformat(msg, 190, input, 3); replace_all(msg, 190, "!x04", "^4"); replace_all(msg, 190, "!x03", "^3"); if(id) players[0] = id; else get_players(players, count, "ch"); { for(new i = 0; i < count; i++) { if(is_user_connected(players)) { message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, players); write_byte(players); write_string(msg); message_end(); } } } }
Nume: [ZP] Points Shop
Versiune: 2.0.3 AIO BETA
Autori: londoN // credite hades
Link oficial:aici
Instalare:
1. Fisierul Points_Shop.sma il puneti in addons/amxmodx/scripting
2. Fisierul Points_Shop.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Code: Select all
Points_Shop.amxx
Nu are
Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
Nu sunt
Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
nu sunt
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- cstrike
- hamsandwich
- fakemeta
- fun
Imagini: