para eklentisi
Gönderilme zamanı: Pzt Eyl 10, 2018 1:03 am
Size bişi sorucam çok aradım bulamadım t takımı ve ct takımı oyundayken 5 el boyunca el alamıyorsa el alamayan takıma 16 k para vermesini istiyorum böyle bir plugin varmdır
Kod: Tümünü seç
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "PLUGİN ADI"
#define VERSION "1.0"
#define AUTHOR "OnlyCoder"
new ctt[33],tt[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("SendAudio", "guards_win", "a", "2=%!MRAD_ctwin")
register_event("SendAudio", "guards_lose", "a", "2=%!MRAD_terwin")
}
public guards_win()
{
for(new i;i<get_maxplayers();i++)
{
if(ctt[i] == 0 && tt[i] == 5)
{
server_cmd("amx_givemoney @CT 16000")
ctt[i] = 0
renkli_yazi(0,"!gCT 5 El Kazanamadigi Icin Paralari 1600 Oldu.")
}
else
{
ctt[i] += 1
}
}
}
public guards_lose()
{
for(new i;i<get_maxplayers();i++)
{
if(tt[i] == 0 && ctt[i] == 5)
{
server_cmd("amx_givemoney @T 16000")
tt[i] = 0
renkli_yazi(0,"!gT 5 El Kazanamadigi Icin Paralari 1600 Oldu.")
}
else
{
tt[i] += 1
}
}
}
stock renkli_yazi(const id, const input[], any:...) // yeni renkler
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!g", "^x04"); // Yeşil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
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();
}
}
}
}
buyur sma silsene yeniden adllandır amxx yazarsiniz
Kod: Tümünü seç
server_cmd("amx_givemoney @CT 16000")
Kod: Tümünü seç
rg_give_user_money(id,amount);
Kod: Tümünü seç
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "PLUGİN ADI"
#define VERSION "1.0"
#define AUTHOR "OnlyCoder"
new ctt[33],tt[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("SendAudio", "guards_win", "a", "2=%!MRAD_ctwin")
register_event("SendAudio", "guards_lose", "a", "2=%!MRAD_terwin")
}
public guards_win()
{
for(new i;i<get_maxplayers();i++)
{
if(tt[i] >= 5 || ctt >= 5 )
{
ctt[i] = 0
tt[i] = 0
}
if(ctt[i] == 0 && tt[i] == 5)
{
server_cmd("amx_givemoney @CT 16000")
ctt[i] = 0
renkli_yazi(0,"!gCT 5 El Kazanamadigi Icin Paralari 1600 Oldu.")
cs_set_user_money(i, 16000)
}
else
{
ctt[i] += 1
}
}
}
public guards_lose()
{
for(new i;i<get_maxplayers();i++)
{
if(tt[i] >= 5 || ctt >= 5 )
{
ctt[i] = 0
tt[i] = 0
}
if(tt[i] == 0 && ctt[i] == 5)
{
server_cmd("amx_givemoney @T 16000")
cs_set_user_money(i, 16000)
tt[i] = 0
renkli_yazi(0,"!gT 5 El Kazanamadigi Icin Paralari 1600 Oldu.")
}
else
{
tt[i] += 1
}
}
}
stock renkli_yazi(const id, const input[], any:...) // yeni renkler
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!g", "^x04"); // Yeşil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
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();
}
}
}
}