https://forums.alliedmods.net/showpo...9&postcount=12
Bu konudaki eklentiyi editledim.
PHP- Kodu:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "Give Last Item"
#define VERSION "1.0"
new const SON_T[] = "efe_levelup.wav"
new bool:g_bOneTLeft
new map[32]
public plugin_precache() {
precache_sound(SON_T)
}
public plugin_init() {
get_mapname(map,31);
if((containi(map,"jail") == -1) && (containi(map,"jb_") == -1)) return
register_plugin(PLUGIN, VERSION, "ConnorMcLeod")
register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
RegisterHam(Ham_Killed, "player", "OnCBasePlayer_Killed_Post", true)
}
public Event_HLTV_New_Round() {
g_bOneTLeft = false
}
public OnCBasePlayer_Killed_Post(id) {
if(!g_bOneTLeft && cs_get_user_team(id) == CS_TEAM_T) {
new players[32], num
get_players(players, num, "ae", "TERRORIST")
if(num == 1) {
g_bOneTLeft = true
emit_sound(0, CHAN_WEAPON, SON_T, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/