/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#define PLUGIN "Yeni Plugin"
#define VERSION "1.0"
#define AUTHOR "Kalipso22"
new g_awp,bool:g_alamazsin;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
}
public CS_OnBuyAttempt(id, CSI_AWP){
g_awp = 0;
new players[32],inum;
static tempid;
get_players(players,inum)
for(new i; i<inum; i++)
{
if(user_has_weapon(tempid, CSW_AWP)){
g_awp++
if(g_awp > 5){
g_alamazsin = true;
}
else{
g_alamazsin = false;
}
}
}
return PLUGIN_HANDLED;
}
public CS_OnBuy(id,CSI_AWP){
if(g_alamazsin){
renkli_yazi(id,"!g5'ten fazla !tAWP !goldugu icin satin alamazsin!");
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
stock renkli_yazi(const id, const Input[], any:...)
{
static Message[191];
vformat(Message, 190, Input, 3);
replace_all(Message, 190, "!n", "^x01");
replace_all(Message, 190, "!g", "^x04");
replace_all(Message, 190, "!t", "^x03");
#if AMXX_VERSION_NUM < 183
new Count = 1, Players[32];
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(Message);
message_end();
}
}
}
#else
client_print_color(id, id, Message);
#endif
}