#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <fakemeta_util>
#if defined _colorchat_included
#endinput
#endif
#define _colorchat_included
enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}
new TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
if( !get_playersnum() ) return;
new message[256];
switch(type)
{
case NORMAL: // clients scr_concolor cvar color
{
message[0] = 0x01;
}
case GREEN: // Green
{
message[0] = 0x04;
}
default: // White, Red, Blue
{
message[0] = 0x03;
}
}
vformat(message[1], 251, msg, 4);
// Make sure message is not longer than 192 character. Will crash the server.
message[192] = '^0';
new team, ColorChange, index, MSG_Type;
if(id)
{
MSG_Type = MSG_ONE;
index = id;
} else {
index = FindPlayer();
MSG_Type = MSG_ALL;
}
team = get_user_team(index);
ColorChange = ColorSelection(index, MSG_Type, type);
ShowColorMessage(index, MSG_Type, message);
if(ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team]);
}
}
ShowColorMessage(id, type, message[])
{
static bool:saytext_used;
static get_user_msgid_saytext;
if(!saytext_used)
{
get_user_msgid_saytext = get_user_msgid("SayText");
saytext_used = true;
}
message_begin(type, get_user_msgid_saytext, _, id);
write_byte(id)
write_string(message);
message_end();
}
Team_Info(id, type, team[])
{
static bool:teaminfo_used;
static get_user_msgid_teaminfo;
if(!teaminfo_used)
{
get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
teaminfo_used = true;
}
message_begin(type, get_user_msgid_teaminfo, _, id);
write_byte(id);
write_string(team);
message_end();
return 1;
}
ColorSelection(index, type, Color:Type)
{
switch(Type)
{
case RED:
{
return Team_Info(index, type, TeamName[1]);
}
case BLUE:
{
return Team_Info(index, type, TeamName[2]);
}
case GREY:
{
return Team_Info(index, type, TeamName[0]);
}
}
return 0;
}
FindPlayer()
{
new i = -1;
while(i <= get_maxplayers())
{
if(is_user_connected(++i))
return i;
}
return -1;
}
public plugin_init() {
register_plugin("PUBG Menu", "1.0", "noeldayi remake:PowereXe")
register_clcmd("say /pubgmenu" , "pubg_menu")
}
public pubg_menu(id)
{
new menu = menu_create("Pubg Menu", "pubg_menu2")
menu_additem(menu, "\y+10 HP \r1000$", "1", 0);
menu_additem(menu, "\y+30 HP \r3000$", "2", 0);
menu_additem(menu, "\y+50 HP \r5000$", "3", 0);
menu_additem(menu, "\y30 Mermili M4A1 \r10000$", "4", 0);
menu_additem(menu, "\y10 Mermili AWP \r15000$", "5", 0);
menu_setprop(menu, MPROP_EXITNAME, "Cikis")
menu_display(id, menu, 0)
}
public pubg_menu2(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
{
new data[6], ÝName[32], Access, Callback
menu_item_getinfo(menu, item, Access, data, 5, iName, 31, Callback yan)
new anahtar = str_to_num(data)
switch(key)
{
case 1: {
if(cs_get_user_money(id) >= 1000) {
set_user_health(id, get_user_health(id) + 10);
cs_set_user_money(id, cs_get_user_money - 1000);
ColorChat(id,NORMAL,"Basariyla^4 +10 ^1HP Satin Aldiniz);
}
else {
ColorChat(id,NORMAL,"^3 +10HP^1 Alabilmek Icin Yeterli Paran Yok.^4 1000$ ^1Biriktirmen Gerekiyor.");
}
}
case 2: {
if(cs_get_user_money(id) >= 3000) {
cs_set_user_money(id, cs_get_user_money - 3000);
set_user_health(id, get_user_health(id) + 30);
ColorChat(id,NORMAL,"Basariyla^4 +30 ^1HP Satin Aldiniz);
}
else {
ColorChat(id,NORMAL,"^3 +30HP^1 Alabilmek Icin Yeterli Paran Yok.^4 3000$ ^1Biriktirmen Gerekiyor.");
}
}
case 3: {
if(cs_get_user_money(id) >= 5000) {
cs_set_user_money(id, cs_get_user_money - 5000);
set_user_health(id, get_user_health(id) + 50);
ColorChat(id,NORMAL,"Basariyla^4 +50 ^1HP Satin Aldiniz);
}
else {
ColorChat(id,NORMAL,"^3 +50HP^1 Alabilmek Icin Yeterli Paran Yok.^4 5000$ ^1Biriktirmen Gerekiyor.");
}
}
case 4: {
if(cs_get_user_money(id) >= 10000) {
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 0);
cs_set_user_money(id, cs_get_user_money - 10000);
ColorChat(id,NORMAL,"Basariyla^4 30 Mermili M4A1 ^1Satin Aldiniz);
}
else {
ColorChat(id,NORMAL,"^3 30 Mermili M4A1 ^1Alabilmek Icin Yeterli Paran Yok.^4 10000$ ^1Biriktirmen Gerekiyor.");
}
}
case 5: {
if(cs_get_user_money(id) >= 15000) {
give_item(id, "weapon_awp");
cs_set_user_bpammo(id, CSW_AWP, 0);
cs_set_user_money(id, cs_get_user_money - 15000);
ColorChat(id,NORMAL,"Basariyla^4 10 Mermili AWP ^1Satin Aldiniz);
}
else {
ColorChat(id,NORMAL,"^3 10 Mermili AWP ^1Alabilmek Icin Yeterli Paran Yok.^4 15000$ ^1Biriktirmen Gerekiyor.");
}
}
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
/* 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 }
*/