|
wwA PlayCs
Membru
Membru din: Dum Noi 22, 2015 1:26 pm Mesaje: 301 Localitate: Sibiu
Steam ID: magenkyo17
Skype ID: sound_cstrike
Server Preferat: Respawn.Playcs.ro
|
Descriere: M-am ganddit sa fac un cadou celor care au servere clasice / xmas, facand ceva in genu la zombie outstanding ( meniu , shop points etc etc ). Descarcare: - xmas_game_menu.sma | Show code
#include < amxmodx > #include < amxmisc > #include < cstrike > #include < fun > #include < hamsandwich >
new const PLUGIN [ ] = "[XMAS Outstanding]"; new const OWNER_CONTACT [ ] = "romanya_what@yahoo.com"; new const OUR_FORUM [ ] = "www.rangfort.ro";
new g_bPoints [ 33 ];
new bool: ZU [33 ], bool: KISS [ 33 ], bool: DIZZ [ 33 ];
native csdm_get_user_points ( id ); native csdm_set_user_points ( id, iNum );
new const g_access_file [ ] = "addons/amxmodx/configs/users.ini"; new const g_password_field [ ] = "_pw"; new const g_admin_flags [ ] = "abcdefghijk"; // flagurile pe care le cumpara
public plugin_init ( ) { register_plugin ( "XMAS Game Menu", "1.0", "LondoN #" ); register_clcmd ( "chooseteam", "game_menu" ); register_clcmd ( "say /stop", "cmd_stop" ); set_task ( 42.5, "TaskAnnounce", _, _, _, "b" ); }
public game_menu ( id ) { new menu = menu_create ( "\rXMAS.RANGFORT.RO \yGame Menu", "menu_principal" ); menu_additem ( menu, "\r[1] \wContact Owner", "1", 0 ); menu_additem ( menu, "\r[2] \wRadio Menu", "2", 0 ); menu_additem ( menu, "\r[3] \wPoints Shop", "3", 0 ); menu_additem ( menu, "\r[4] \wJoin Spectators", "4", 0 ); menu_additem ( menu, "\r[5] \wForum", "5", 0 ); menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL ); menu_display ( id, menu, 0 ); return PLUGIN_CONTINUE; }
public menu_principal ( id, menu, item ) { if ( item == MENU_EXIT ) { menu_destroy ( menu ); ColorChat ( id, "!x04%s !x03You closed the !x04Game Menu", PLUGIN ); return PLUGIN_HANDLED; } new szData [ 7 ], szName [ 64 ]; new Access, Callback; menu_item_getinfo ( menu, item, Access, szData, 5, szName, 63, Callback ); new szKey = str_to_num ( szData ); g_bPoints [ id ] = csdm_get_user_points ( id ); switch ( szKey ) { case 1 : { ColorChat ( id, "!x04%s !x03Owner Y!M: !x04%s", OWNER_CONTACT ); return PLUGIN_CONTINUE; } case 2 : { new g_menu = menu_create ( "\rRadio \wMenu", "menu_radio" ); menu_additem ( g_menu, "\r[1] \wRadio DIZZ", "1", 0 ); menu_additem ( g_menu, "\r[2] \wRadio KISS", "2", 0 ); menu_additem ( g_menu, "\r[3] \wRadio ZU", "3", 0 ); menu_setprop ( g_menu, MPROP_EXIT, MEXIT_ALL ); menu_display ( id, g_menu, 0 ); return PLUGIN_CONTINUE; } case 3 : { new title [ 256 ]; formatex ( title, charsmax ( title ), "\r Points Shop ^n\wPoints: \r%d", g_bPoints ); new l_menu = menu_create ( title, "menu_points" ); menu_additem ( l_menu, "\r[1] \wBuy Respawn [\r50 Points\w]", "1", 0 ); menu_additem ( l_menu, "\r[2] \wBuy Trider [\r150 Points\w]", "2", 0 ); menu_additem ( l_menu, "\r[3] \wBuy Money [\r250 Points\w]", "3", 0 ); menu_additem ( l_menu, "\r[4] \w75 Frags [\r550 Points\w]", "4", 0 ); menu_additem ( l_menu, "\r[5] \wBuy SLOT [\r1500 Points\w]", "5", 0 ); menu_additem ( l_menu, "\r[6] \wBuy ADMIN [\r9500 Points\w]", "6", 0 ); menu_setprop ( l_menu, MPROP_EXIT, MEXIT_ALL ); menu_display ( id, l_menu, 0 ); return PLUGIN_CONTINUE; } case 4 : { if ( is_user_alive ( id ) ) { ColorChat ( id, "!x04%s !x03We can't put you to spectators because you're alive.", PLUGIN ); return PLUGIN_HANDLED; } if ( is_user_admin ( id ) ) { cs_set_user_team ( id, CS_TEAM_SPECTATOR ); ColorChat ( id, "!x04%s !x03We moved you to the !x04Spectators", PLUGIN ); } if ( !is_user_alive ( id ) ) { cs_set_user_team ( id, CS_TEAM_SPECTATOR ); ColorChat ( id, "!x04%s !x03We moved you to the !x04Spectators", PLUGIN ); } } case 5 : { ColorChat ( 0, "!x04%s !x03Our forum is !x04%s", OUR_FORUM ); } } return PLUGIN_CONTINUE; }
public menu_radio ( id, g_menu, item ) { if ( item == MENU_EXIT ) { menu_destroy ( g_menu ); ColorChat ( id, "!x04%s !x03You closed !x04Radio Menu", PLUGIN ); return PLUGIN_HANDLED; } new szData [ 7 ], szName [ 64 ]; new Access, Callback; menu_item_getinfo ( g_menu, item, Access, szData, 5, szName, 63, Callback ); new szKey = str_to_num ( szData ); switch ( szKey ) { case 1 : { show_motd ( id, "addons/amxmodx/configs/xmas/radio/dizz.html" ); DIZZ [ id ] = true; } case 2 : { show_motd ( id, "addons/amxmodx/configs/xmas/radio/kiss.html" ); KISS [ id ] = true; } case 3 : { show_motd ( id, "addons/amxmodx/configs/xmas/radio/zu.html" ); ZU [ id ] = true; } } return PLUGIN_CONTINUE; }
public menu_points ( id, l_menu, item ) { if ( item == MENU_EXIT ) { menu_destroy ( l_menu ); ColorChat ( id, "!x04%s !x03You closed !x04Points Shop", PLUGIN ); return PLUGIN_HANDLED; } g_bPoints [ id ] = csdm_get_user_points ( id ); new szData [ 7 ], szName [ 64 ]; new Access, Callback; menu_item_getinfo ( l_menu, item, Access, szData, 5, szName, 63, Callback ); new szKey = str_to_num ( szData ); switch ( szKey ) { case 1 : { if ( g_bPoints [ id ] < 50 ) { ColorChat ( id, "!x04%s !x03You need !x0450 !x03points to buy !x04RESPAWN", PLUGIN ); ColorChat ( id, "!x04%s !x03Avaible Points: !x04%d", PLUGIN, g_bPoints [ id ] ); return PLUGIN_HANDLED; } if ( is_user_alive ( id ) ) { ColorChat ( id, "!x04%s !x03You are !x04alive", PLUGIN ); return PLUGIN_HANDLED; } ExecuteHamB ( Ham_CS_RoundRespawn, id ); csdm_set_user_points ( id, g_bPoints [ id ] - 50 ); ColorChat ( id, "!x04%s !x03You bought !x04RESPAWN", PLUGIN ); } case 2 : { if ( g_bPoints [ id ] < 150 ) { ColorChat ( id, "!x04%s !x03You need !x04150 !x03points to buy !x04TRYDER", PLUGIN ); ColorChat ( id, "!x04%s !x03Avaible Points: !x04%d", PLUGIN, g_bPoints [ id ] ); return PLUGIN_HANDLED; } /* Strip Weapons */ strip_user_weapons ( id ); /* Giving Weapons */ give_item ( id, "weapon_knife" ); give_item ( id, "weapon_deagle" ); give_item ( id, "weapon_ak47" ); give_item ( id, "weapon_m4a1" ); give_item ( id, "weapon_hegrenade" ); give_item ( id, "weapon_flashbang" ); give_item ( id, "weapon_flashbang" ); give_item ( id, "weapon_smokegrenade" ); /* Setting Player HP/AP */ set_user_armor ( id, 100 ); set_user_health ( id, 150 ); /* Setting Weapon Ammo */ cs_set_user_bpammo ( id, CSW_DEAGLE, 35 ); cs_set_user_bpammo ( id, CSW_AK47, 90 ); cs_set_user_bpammo ( id, CSW_M4A1, 90 ); csdm_set_user_points ( id, g_bPoints [ id ] - 150 ); ColorChat ( id, "!x04%s !x03You bought !x04TRYDER", PLUGIN ); } case 3 : { if ( g_bPoints [ id ] < 250 ) { ColorChat ( id, "!x04%s !x03You need !x04250 !x03points to buy !x04Money (16000)", PLUGIN ); ColorChat ( id, "!x04%s !x03Avaible Points: !x04%d", PLUGIN, g_bPoints [ id ] ); return PLUGIN_HANDLED; } if ( !is_user_alive ( id ) ) { ColorChat ( id, "!x04%s !x03You're not !x04alive", PLUGIN ); return PLUGIN_HANDLED; } if ( cs_get_user_money ( id ) == 16000 ) { ColorChat ( id, "!x04%s !x03You already have !x0416000 $", PLUGIN ); return PLUGIN_HANDLED; } cs_set_user_money ( id, 16000 ); csdm_set_user_points ( id, g_bPoints [ id ] - 250 ); ColorChat ( id, "!x04%s !x03You bought !x04Money", PLUGIN ); } case 4 : { if ( g_bPoints [ id ] < 550 ) { ColorChat ( id, "!x04%s !x03You need !x04550 !x03points to buy !x0475 Frags", PLUGIN ); ColorChat ( id, "!x04%s !x03Avaible Points: !x04%d", PLUGIN, g_bPoints [ id ] ); return PLUGIN_HANDLED; } set_user_frags ( id, get_user_frags ( id ) + 75 ); csdm_set_user_points ( id, g_bPoints [ id ] - 550 ); ColorChat ( id, "!x04%s !x03You bought !x0475 Frags", PLUGIN ); } case 5 : { if ( g_bPoints [ id ] < 1500 ) { ColorChat ( id, "!x04%s !x03You need !x041500 !x03points to buy !x04SLOT", PLUGIN ); ColorChat ( id, "!x04%s !x03Avaible Points: !x04%d", PLUGIN, g_bPoints [ id ] ); return PLUGIN_HANDLED; } if ( get_user_flags ( id ) & read_flags ( "b" ) ) { ColorChat ( id, "!x04%s !x03You already have !x04SLOT", PLUGIN ); return PLUGIN_HANDLED; } new szPassword [ 3 ], szBuffer [ 512 ], szName [ 32 ]; formatex ( szPassword, charsmax ( szPassword ), "%c%c%c", random_num ( 'A', 'Z' ), random_num ( 'a', 'z' ), random_num ( '1', '9' ) ); get_user_name ( id, szName, charsmax ( szName ) ); formatex ( szBuffer, charsmax ( szBuffer ), " ^"%s^" ^"%s^" ^"b^" ^"a^" // Slot Cumparat cu points", szName, szPassword ); ColorChat ( 0, "!x04%s !x03Player !x04%s !x03bought !x04SLOT!", PLUGIN, szName ); ColorChat ( id, "!x04%s !x03YOUR PASSWORD: !x04%s", PLUGIN, szPassword ); ColorChat ( id, "!x04%s !x03USE: !x04setinfo %s %s", PLUGIN, g_password_field, szPassword ); set_hudmessage(0, 127, 255, 0.32, 0.15, 0, 6.0, 5.0 ); show_hudmessage(id, "You bought SLOT!^nYour Password: %s", szPassword ); write_file ( g_access_file, szBuffer ); console_print ( id, "[XMAS Outstanding] SLOT PASSWORD: %s", szPassword ); console_print ( id, "[XMAS Outstanding] SLOT PASSWORD: %s", szPassword ); console_print ( id, "[XMAS Outstanding] SLOT PASSWORD: %s", szPassword ); csdm_set_user_points ( id, g_bPoints [ id ] - 1500 ); } case 6 : { if ( g_bPoints [ id ] < 9500 ) { ColorChat ( id, "!x04%s !x03You need !x049500 !x03points to buy !x04ADMIN", PLUGIN ); ColorChat ( id, "!x04%s !x03Avaible Points: !x04%d", PLUGIN, g_bPoints [ id ] ); return PLUGIN_HANDLED; } if ( is_user_admin ( id ) ) { ColorChat ( id, "!x04%s !x03You already have !x04ADMIN", PLUGIN ); return PLUGIN_HANDLED; } new szPassword [ 5 ], szBuffer [ 512 ], szName [ 32 ]; get_user_name ( id, szName, charsmax ( szName ) ); formatex ( szPassword, charsmax ( szPassword ), "%c%c%c%c%c", random_num ( 'A', 'Z' ), random_num ( '1', '9' ), random_num ( 'a', 'z' ), random_num ( 'l', 'q' ), random_num ( '3', '6' ) ); formatex ( szBuffer, charsmax ( szBuffer ), " ^"%s^" ^"%s^" ^"%s^" ^"a^" // Admin Cumparat cu points", szName, szPassword, g_admin_flags ); ColorChat ( 0, "!x04%s !x03Player !x04%s !x03bought !x04ADMIN", PLUGIN, szName ); ColorChat ( id, "!x04%s !x03YOUR PASSWORD: !x04%s", PLUGIN, szPassword ); ColorChat ( id, "!x04%s !x03USE: !x04setinfo %s %s", PLUGIN, g_password_field, szPassword ); set_hudmessage(0, 127, 255, 0.32, 0.15, 0, 6.0, 5.0 ); show_hudmessage(id, "You bought ADMIN!^nYour Password: %s", szPassword ); write_file ( g_access_file, szBuffer ); console_print ( id, "[XMAS Outstanding] ADMIN PASSWORD: %s", szPassword ); console_print ( id, "[XMAS Outstanding] ADMIN PASSWORD: %s", szPassword ); console_print ( id, "[XMAS Outstanding] ADMIN PASSWORD: %s", szPassword ); csdm_set_user_points ( id, g_bPoints [ id ] - 9500 ); } } return PLUGIN_CONTINUE; }
public TaskAnnounce ( ) { ColorChat ( 0, "!x04%s !x03Say !x04/stop !x03to stop the radio", PLUGIN ); return PLUGIN_CONTINUE; }
public cmd_stop ( id ) { if ( KISS [ id ] ) { show_motd ( id, "addons/amxmodx/configs/xmas/radio/kiss_stop.html" ); KISS [ id ] = false; } if ( DIZZ [ id ] ) { show_motd ( id, "addons/amxmodx/configs/xmas/radio/dizz_stop.html" ); DIZZ [ id ] = false; } if ( ZU [ id ] ) { show_motd ( id, "addons/amxmodx/configs/xmas/radio/zu_stop.html" ); ZU [ id ] = false; } return PLUGIN_CONTINUE; }
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[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]); write_byte(players[i]); write_string(msg); message_end(); } } } }
- xmas_points_sistem.sma | Show code
#include < amxmodx > #include < amxmisc > #include < cstrike > #include < fun >
new const PLUGIN [ ] = "Points"; new const VERSION [ ] = "1.3"; new const AUTHOR [ ] = "Alex #";
new Points [ 33 ]; new SaveDataFile [ 128 ];
const Float:HUD_SPECT_X = -1.0 const Float:HUD_SPECT_Y = 0.8
public plugin_init ( ) { register_plugin ( PLUGIN, VERSION, AUTHOR ); register_event ( "DeathMsg", "eDeath", "a" ); new DataDir [ 64 ]; get_configsdir ( DataDir, charsmax ( DataDir ) ); format ( SaveDataFile, 127, "%s/Points.dat", DataDir ); set_task ( 0.1, "TASK_MSG", _, _, _, "b" ); }
public plugin_natives ( ) { register_native ( "csdm_get_user_points", "get_user_points", 1 ); register_native ( "csdm_set_user_points", "set_user_points", 1 ); }
public get_user_points ( id ) { return Points [ id ]; }
public set_user_points ( id, PointsNum ) { Points [ id ] = PointsNum; }
public eDeath ( ) { new Killer = read_data ( 1 ); new Victim = read_data ( 2 ); new HeadShoot = read_data ( 3 ); if ( Killer == Victim ) return PLUGIN_HANDLED; Points [ Killer ] += 1; if ( HeadShoot ) { Points [ Killer ] += 2; } return PLUGIN_CONTINUE; }
public client_connect ( id ) { LoadPoints ( id ); }
public client_disconnect ( id ) { SavePoints ( id ); }
public LoadPoints ( id ) { new Name [ 32 ]; get_user_name ( id, Name, 31 ); new Line [ 128 ], IsPlayer = false, Arg1 [ 32 ], Arg2 [ 32 ]; new File = fopen ( SaveDataFile, "rt" ) while ( !feof ( File ) ) { fgets ( File, Line, 127 ); trim ( Line ); parse ( Line, Arg1, 31, Arg2, 31 ); if ( equali ( Arg1, Name ) ) { Points [ id ] = str_to_num ( Arg2 ); IsPlayer = true; break; } } fclose ( File ); if ( !IsPlayer ) Points [ id ] = 0; }
public SavePoints ( id ) { new Name [ 32 ]; get_user_name ( id, Name, 31 ); new Save [ 1024 ]; format ( Save, sizeof ( Save ) -1, "^"%s^" %d", Name, Points [ id ] ); new Line [ 128 ], Linie, IsPlayer = false, Arg1 [ 32 ] new File = fopen ( SaveDataFile, "rt" ); while ( !feof ( File ) ) { fgets ( File, Line, 127 ); parse ( Line, Arg1, 31 ); if ( equali ( Arg1, Name ) ) { write_file ( SaveDataFile, Save, Linie ); IsPlayer = true; break; } Linie++ } fclose ( File ); if ( !IsPlayer ) write_file ( SaveDataFile, Save, -1 ); }
public TASK_MSG ( ) { static id; for ( id = 1; id <= get_maxplayers ( ); id++ ) { if ( is_user_alive ( id ) && is_user_connected ( id ) ) { switch ( cs_get_user_team ( id ) ) { case CS_TEAM_T : { set_hudmessage ( id, 127, 255, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0, -1 ); show_hudmessage ( id, "Terorist, HP: %d - AP: %d - Points: %d", get_user_health ( id ), get_user_armor ( id ), Points [ id ] ); } case CS_TEAM_CT : { set_hudmessage ( id, 127, 255, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0, -1 ) show_hudmessage ( id, "Counter, HP: %d - AP: %d - Points: %d", get_user_health ( id ), get_user_armor ( id ), Points [ id ] ); } case CS_TEAM_SPECTATOR : { return PLUGIN_CONTINUE; } } } } return PLUGIN_CONTINUE; } Nume: XMAS Like Outstanding Versiune: XMAS Game Menu: 1.0 | Points Sistem: 1.3 Link oficial: Aici Autor: LoNNNDoNNN Instalare: 1. Fisierele points_sistem.sma & xmas_game_menu.sma le puneti in /scripting2. Fisierele points_sistem.amxx & xmas_game_menu.amxx le puneti in /plugins3. Intrati in plugins.ini si adaugati - | Show code
; ======================================= ; == XMAS OUTSTANGING - CS.SERVER.RO == ; ======================================= points_sistem.amxx ; Points Sistem xmas_game_menu.amxx ; Game Menu Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg): Nu sunt Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator): Nu sunt Comenzi publice (se tasteaza in joc prin apasarea tastei Y): Comanda /stop opreste radioul. Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini): Modulul hamsandwichModulul cstrikeModulul fun
_________________ ș-am numa vorbe de aur,ingropama-ti in bvlgari!
|