02-27-2025, 05:37 PM
Djem une e hapa ket tem qe krejt ju me i qit naj script qka e keni , ju lutna sa ma pak spamm !!!
Ju tjeret ju propozoj keto script me i bo compile tek amx.freakz.ro
Ju tjeret ju propozoj keto script me i bo compile tek amx.freakz.ro
1. Reset Score
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define adtime 600.0 //Default of 10 minuites
new pcvar_Advertise
new pcvar_Display
public plugin_init()
{
register_plugin("Reset Score", "1.0", "Silenttt")
//You may type /resetscore or /restartscore
register_clcmd("say /resetscore", "reset_score")
register_clcmd("say /restartscore", "reset_score")
register_clcmd("say /rs", "reset_score")
//This command by default will be set at 0
//Change it to 1 in server.cfg if you want
//A message to be shown to advertise this.
pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
//This command by default is also 0
//Change it to 1 in server.cfg if you want
//It to show who reset their scores when they do it
pcvar_Display = register_cvar("sv_rsdisplay", "0")
if(get_cvar_num("sv_rsadvertise") == 1)
{
set_task(adtime, "advertise", _, _, _, "b")
}
}
public reset_score(id)
{
//These both NEED to be done twice, otherwise your frags wont
//until the next round
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
if(get_pcvar_num(pcvar_Display) == 1)
{
new name[33]
get_user_name(id, name, 32)
client_print(0, print_chat, "%s sapo ka restartuar scoren e tije", name)
}
else
{
client_print(id, print_chat, "Ju sapo keni ristartuar scoren tuaj")
}
return PLUGIN_HANDLED
}
public advertise()
{
set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Shkruaj /rs ne chat per ta kthyer rezultatin ne 0")
}
public client_putinserver(id)
{
if(get_pcvar_num(pcvar_Advertise) == 1)
{
set_task(10.0, "connectmessage", id, _, _, "a", 1)
}
}
public connectmessage(id)
{
if(is_user_connected(id))
{
client_print(id, print_chat, "Shkruaj /rs ne chat per ta kthyer rezultatin ne 0")
}
}2. Anti Reklama
Code:
#include <amxmodx>
#include <amxmisc>
#include <regex>
new Regex:re, ret;
public plugin_init() {
register_plugin("Anti-Reklama", "0.1", "eSK");
register_clcmd("say", "CheckMessage");
register_clcmd("say_team", "CheckMessage");
new err[32];
re = regex_compile("(?:\w+\.[a-z]{2,4}\b|(?:\s*\d+\s*\.){3})", ret, err, 31, "i");
if (re!=REGEX_OK) server_print("Error: %s (%d)", err, ret);
}
public CheckMessage(id) {
if (id > 0 && id < 33 && !is_user_admin(id)) {
new text[64];
read_args(text,63);
if (strlen(text) > 4) {
new match = regex_match_c(text, re, ret);
if (match > 0) {
client_print(id, print_chat, "Ndalohet reklamimi ne server!");
return PLUGIN_HANDLED;
}
}
}
return PLUGIN_CONTINUE;
}
public plugin_end() {
regex_free(re);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3079\\ f0\\ fs16 \n\\ par }
*/


![[Image: MESHrFA.png]](http://i.imgur.com/MESHrFA.png)