Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <cstrike>
- #include <hamsandwich>
- #include <colorchat>
- #define PLUGIN "Counter-Terrorists Kill Count"
- #define AUTHOR "CheezPuff"
- #define KILL 25
- #define TASK_HUD 1994
- new g_iKillCount[33]
- public plugin_init()
- {
- register_plugin(PLUGIN, "v1.0", AUTHOR)
- register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0")
- RegisterHam(Ham_Spawn, "player", "fw_PlayerRespawn", 1)
- RegisterHam(Ham_Killed, "player", "fw_PlayerKilled", 1)
- }
- public client_disconnect(id) // if you running server with lastest amx version 1.9.0 change this line - client_disconnect -> client_disconnected
- {
- g_iKillCount[ id ] = 0;
- }
- public Event_NewRound()
- arrayset(g_iKillCount, 0, sizeof g_iKillCount)
- public fw_PlayerRespawn(id)
- {
- if(is_user_alive(id))
- {
- set_task(1.0, "KillHud", id+TASK_HUD, _, _, "b")
- }
- }
- public KillHud(id)
- {
- id -= TASK_HUD
- if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
- {
- if(g_iKillCount[id] <= 15)
- {
- new PlayerInfoHud = CreateHudSyncObj()
- //set_hudmessage(255, 0, 0, 0.28, 0.86, 0, 6.0, 12.0)
- //show_hudmessage(id, "")
- set_hudmessage(random_num(10,255), random(256), random(256), -1.0, 0.86, 0, 3.0, 6.0, 0.0, 0.0, -1)
- ShowSyncHudMsg(id, PlayerInfoHud,"Killed zombies: %d/15", g_iKillCount[id])
- }
- }
- else
- {
- remove_task(id+TASK_HUD)
- }
- }
- public fw_PlayerKilled(iVictim, iKiller)
- {
- if (!is_user_alive(iKiller) || iVictim == iKiller) // בדיקה עם התוקף חי
- return
- if(get_user_team(iKiller) == 2)
- {
- g_iKillCount[iKiller]++
- if(g_iKillCount[iKiller] == 15)
- {
- set_hudmessage(random_num(10,255), random(256), random(256), -1.0, 0.20, 0, 3.0, 6.0, 0.0, 0.0, -1)
- show_hudmessage(iKiller, "You Reach 15/%d Kills of Zombie, Next round you will be in CT team", KILL)
- show_hudmessage(0, "%s killed 15 zombies and moved to CT team", szName( iKiller ))
- ColorChat(iKiller, NORMAL, "^4[Base Builder] ^1You Reach 15/15 Kills of Zombie, you stay as Humans next Round");
- ColorChat(0, NORMAL,"^4[Base Builder] ^3%s^1 killed 15 zombies and moved to CT team", szName( iKiller ))
- cs_set_user_team( iKiller, CS_TEAM_CT );
- ExecuteHamB( Ham_Spawn, iKiller );
- }
- }
- }
- stock szName( const index )
- {
- static szName[ 32 ];
- get_user_name( index, szName, charsmax( szName ) );
- return szName;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement