AlliedModders Donor
Join Date: Mar 2016
Location: Germany
|
09-17-2018
, 23:25
Re: /rs and...
|
#2
|
resetscore one'
Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
// ColorChat Included
enum CC_Colors
{
YELLOW = 1, // 1; Yellow; ^x01; default
GREEN, // 2; Green; ^x04
TEAM_COLOR, // 3; Red, Blue, Grey; ^x03; teamcolor(t;ct;spec)
GREY, // 4; Grey; Spectator Color
RED, // 5; Red; Terrorist Color
BLUE, // 6; Blue; Counter-Terrorist Color
}
new CC_TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
};
public ColorChat(id, CC_Colors:type, const msg[], {Float,Sql,Result,_}:...)
{
if (get_playersnum() < 1)
{
return;
}
static CC_message[256];
switch(type)
{
case YELLOW:
{
CC_message[0] = 0x01;
}
case GREEN:
{
CC_message[0] = 0x04;
}
default:
{
CC_message[0] = 0x03;
}
}
vformat(CC_message[1], 251, msg, 4);
CC_message[192] = '^0';
new CC_team, CC_ColorChange, index, MSG_Type;
if (!id)
{
index = CC_FindPlayer();
MSG_Type = MSG_ALL;
}
else
{
MSG_Type = MSG_ONE;
index = id;
}
CC_team = get_user_team(index);
CC_ColorChange = CC_ColorSelection(index, MSG_Type, type);
CC_ShowColorMessage(index, MSG_Type, CC_message);
if (CC_ColorChange)
{
CC_TeamInfo(index, MSG_Type, CC_TeamName[CC_team]);
}
}
CC_ShowColorMessage(index, type, message[])
{
static CC_SayText;
if (!CC_SayText)
{
CC_SayText = get_user_msgid("SayText");
}
message_begin(type, CC_SayText, _, index);
write_byte(index);
write_string(message);
message_end();
}
CC_TeamInfo(index, type, team[])
{
static CC_TeamInfo;
if (!CC_TeamInfo)
{
CC_TeamInfo = get_user_msgid("TeamInfo");
}
message_begin(type, CC_TeamInfo, _, index);
write_byte(index);
write_string(team);
message_end();
return 1;
}
CC_ColorSelection(index, type, CC_Colors:Type)
{
switch(Type)
{
case RED:
{
return CC_TeamInfo(index, type, CC_TeamName[1]);
}
case BLUE:
{
return CC_TeamInfo(index, type, CC_TeamName[2]);
}
case GREY:
{
return CC_TeamInfo(index, type, CC_TeamName[0]);
}
}
return 0;
}
CC_FindPlayer()
{
new index = -1;
while(index <= get_maxplayers())
{
if (is_user_connected(++index))
{
return index;
}
}
return -1;
}
public plugin_init()
{
register_plugin("ResetScore", "1.0", "www.old-zone.ro");
register_clcmd("say /resetscore", "command_RS");
register_clcmd("say /rs", "command_RS");
}
public command_RS(id)
{
if (!is_user_connected(id)) return;
cs_set_user_deaths(id, 0);
set_user_frags(id, 0);
cs_set_user_deaths(id, 0);
set_user_frags(id, 0);
ColorChat(id, YELLOW, "Your score has been reseted successfully.");
}
for /money, it works only for vips ;)
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <engine>
#include <colorchat>
#define PLUGIN "FreeMoney"
#define VERSION "1.0"
#define AUTHOR "www.old-zone.ro"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("say /money","Proveri")
}
public Daj(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
cs_set_user_money(id, cs_get_user_money(id) + 16000)
ColorChat(id, TEAM_COLOR, "^4[OLD-ZONE]^3 You got 16000$!^1")
}
else
{
ColorChat(id, TEAM_COLOR, "^4[OLD-ZONE]^3 This command can be used only by ^4VIPs^1")
}
}
public Proveri(id)
{
if(cs_get_user_money(id) >= 16000)
{
ColorChat(id, TEAM_COLOR, "^4[OLD-ZONE]^3 You have already 16000$^1")
}
else
{
Daj(id);
}
}
about /mix. i guess you got it in mix addons
__________________
a simple act of caring creates an endless ripple.
|
|