Kod:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "%20 Sans ile AWP"
#define VERSION "1.0"
#define AUTHOR "JAM1RY00"
#define CHATTAG "ANKA"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /awp","awp"); //Saydan AWP Yazınca calıstırılıcak publıc
}
public awp(oyuncu)
{
switch(random_num(0,5)) //(random_num(0,5)) 0 ile 5. sıradaki caselerden birini calıstırır rastgele
{
case 0:
{
renkli_yazi(oyuncu,"!n[!g%s!n] : !tMuhtesem Kasadan AWP Cikardiniz",CHATTAG);
give_item(oyuncu, "weapon_awp");
cs_set_user_bpammo( oyuncu, CSW_AWP, 10 )
}
case 1:
{
renkli_yazi(oyuncu,"!n[!g%s!n] : !tMalesef AWP Cikmadi !",CHATTAG);
}
case 2:
{
renkli_yazi(oyuncu,"!n[!g%s!n] : !tMalesef AWP Cikmadi !",CHATTAG);
}
case 3:
{
renkli_yazi(oyuncu,"!n[!g%s!n] : !tMalesef AWP Cikmadi !",CHATTAG);
}
case 4:
{
renkli_yazi(oyuncu,"!n[!g%s!n] : !tMalesef AWP Cikmadi !",CHATTAG);
}
}
}
stock renkli_yazi(const id, const input[], any:...){
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();
}
}
}
}