- sma | Afiseaza codul
#include <amxmodx> #include <cstrike> #include <fun> public plugin_init() { register_plugin("ResetScore", "1.0", "daNzEt"); register_clcmd("say /resetscore", "command_RS"); register_clcmd("say /restartscore", "command_RS"); register_clcmd("say /reset", "command_RS"); register_clcmd("say /retry", "command_RS"); register_clcmd("say /rs", "command_RS"); register_clcmd("say resetscore", "command_RS"); register_clcmd("say rs", "command_RS"); } public command_RS(id) { if(cs_get_user_deaths(id) == 0 && get_user_frags(id) == 0) { chat_color(id, "!g[Heker] Scoru-l tau este deja egal cu 0."); return } new name[32] get_user_name(id,name,31) 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); chat_color(id, "!g[Heker] Tocmai ti-ai resetat scorul cu succes."); chat_color(0, "!g[Heker] %s si-a resetat scorul.",name); } stock chat_color(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") replace_all(msg, 190, "!y", "^1") replace_all(msg, 190, "!team", "^3") if (id) players[0] = id; else get_players(players, count, "ch") { for (new i = 0; i < count; i++) { if (is_user_connected(players)) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players) write_byte(players); write_string(msg); message_end(); } } } }
[rezolvat] Plugin RS
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
Forum rules
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
-
- Membru, skill +2
- Posts: 610
- Joined: 10 Nov 2013, 20:24
- Detinator Steam: Da
- Location: Palermo, Italy
- Has thanked: 69 times
- Been thanked: 17 times
Buna cum fac sa nu mai apara cand un player scrie rs ? sau vreo comanda ce este in plugin ?
- sma | Afiseaza codul
Last edited by YONTU on 29 Jan 2014, 20:05, edited 1 time in total.
Reason: Rezolvat!
Reason: Rezolvat!
-
- Fost moderator
- Posts: 9362
- Joined: 06 Jul 2013, 22:08
- Detinator Steam: Da
- Detinator server CS: Nu
- Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn - Has thanked: 492 times
- Been thanked: 547 times
Code: Select all
#include <amxmodx>
#include <cstrike>
#include <fun>
public plugin_init()
{
register_plugin("ResetScore", "1.0", "daNzEt");
register_clcmd("say /resetscore", "command_RS");
register_clcmd("say /restartscore", "command_RS");
register_clcmd("say /reset", "command_RS");
register_clcmd("say /retry", "command_RS");
register_clcmd("say /rs", "command_RS");
register_clcmd("say resetscore", "command_RS");
register_clcmd("say rs", "command_RS");
}
public command_RS(id)
{
if(cs_get_user_deaths(id) == 0 && get_user_frags(id) == 0)
{
chat_color(id, "!g[Heker] Scoru-l tau este deja egal cu 0.");
return
}
new name[32]
get_user_name(id,name,31)
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);
chat_color(id, "!g[Heker] Tocmai ti-ai resetat scorul cu succes.");
chat_color(0, "!g[Heker] %s si-a resetat scorul.",name);
return // AM ADAUGAT ASTA AICI ////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
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();
}
}
}
}
-
- Membru, skill +2
- Posts: 610
- Joined: 10 Nov 2013, 20:24
- Detinator Steam: Da
- Location: Palermo, Italy
- Has thanked: 69 times
- Been thanked: 17 times
Pai sa scot linia asta
stiam si eu eu ma refeeream cand cineva scrie /rs sa fie ascunsa comandanew name[32]
get_user_name(id,name,31)
//chat_color(0, "!g[Heker] %s si-a resetat scorul.",name);
-
- Membru, skill +2
- Posts: 610
- Joined: 10 Nov 2013, 20:24
- Detinator Steam: Da
- Location: Palermo, Italy
- Has thanked: 69 times
- Been thanked: 17 times
si tot arata nume : /rsreturn // AM ADAUGAT ASTA AICI ////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- Membru, skill +2
- Posts: 610
- Joined: 10 Nov 2013, 20:24
- Detinator Steam: Da
- Location: Palermo, Italy
- Has thanked: 69 times
- Been thanked: 17 times
la prima varianta
eroare compilare
eroare compilare
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Modified for http://www.freakz.ro
resetscore.sma(26) : warning 209: function "command_RS" should return a value
resetscore.sma(27) : warning 209: function "command_RS" should return a value
resetscore.sma(33) : error 078: function uses both "return" and "return <value>"
1 Error.
Compile failed!
- AZzeL
- Membru, skill +2
- Posts: 981
- Joined: 02 Oct 2012, 15:24
- Detinator Steam: Da
- CS Status: Invat ingerasii sa moara !
- Detinator server CS: VALCEA.FIREON.RO
- Location: Valcea
- Has thanked: 64 times
- Been thanked: 27 times
- Contact:
-
- Information
-
Who is online
Users browsing this forum: Doctor whO? <3, endlessux, StayAlive, Yandex [Bot] and 39 guests