ERROR AL COMPILAR ESTE PLUGIN (SOLUCIONADO)
#1
Buenas! Bueno paso por aquí para ver si alguien puede ayudarme a hacer que este plugin me compile si alguien me ayuda se lo agradezco mucho
Código PHP:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define adtime     600.0 //Default of 10 minuites

new pcvar_Advertise
new pcvar_Display

enum Colors
{
    
Gris 33,
    
Rojo,
    
Azul
}

public 
plugin_init()
{
    
register_plugin("resetscore""1.0""Ayuwoki")
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")  
    
    
//You may type /resetscore or /restartscore
    
register_clcmd("say /resetscore""reset_score")
    
register_clcmd("say /rs""reset_score")
    
register_clcmd("say  rs""reset_score")
    
register_clcmd("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""1")
    
//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""1")
    
    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(id0)
    
set_user_frags(id0)
    
cs_set_user_deaths(id0)
    
set_user_frags(id0)
    
    if(
get_pcvar_num(pcvar_Display) == 1)

    {
        
///chatcolor(id, Gris, "!g[!nForce!g]!n Has reiniciado tu Score")
    
    
}
    return 
PLUGIN_HANDLED;
    }
        if(
g_maximumrs[id] > 0) {
        
chatcolor(idRojo"!g[!nForce!g]!n SOLO PUEDES HACER UN !colorRS!n POR RONDA!")
        return 
PLUGIN_HANDLED;
    }
    
    else
    {
        
g_maximumrs[id]++
        new 
name[33]
        
get_user_name(idname32)
        
chatcolor(idGris"!g[!nForce!g]!n !color%s !nHAS REINCIADO !colorSCORE"name)
    }
    return 
PLUGIN_HANDLED;
}
}


public 
client_putinserver(id)
{
    
set_task(0.2"chatcolor_send_teaminfo"id);

    if(
get_pcvar_num(pcvar_Advertise) == 1)
    {
        
set_task(10.0"connectmessage"id__"a"1)    
    }
}

public 
connectmessage(id)
{
    if(
is_user_connected(id))
    {
    
chatcolor(idGris"Escribe rs")
    }
}

stock chatcolor(idColors:colormsg[], any:...)
{
    static 
szMsg[191], msgSayText;
    
#define teaminfo_sent(%0) (TeamInfoSent & (1<<%0))
    
    
if (!msgSayText)
        
msgSayText get_user_msgid("SayText");
    
    
vformat(szMsg190msg4);

     
replace_all(szMsg190"!g""^4")
    
replace_all(szMsg190"!n""^1")
         
replace_all(szMsg190"!color""^3");
    
replace_all(szMsg190"!t2""^0")
    
    
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
    
write_byte(color ? (_:color) : 33);
    
write_string(szMsg);
    
message_end();
}

public 
chatcolor_send_teaminfo(id)
{
    if (!
is_user_connected(id))
        return;
    
    static 
msgTeamInfo;
    if (!
msgTeamInfo)
        
msgTeamInfo get_user_msgid("TeamInfo");
    
    static const 
pTeams[][] = { """TERRORIST""CT" };
    
    for (new 
pid 0pid 3pid++)
    {
        
message_begin(MSG_ONE_UNRELIABLEmsgTeamInfo, .player id)
        
write_byte(pid+33)
        
write_string(pTeams[pid])
        
message_end()
    }

Corazón I dream of someday being able to have your near. Corazón
[Imagen: 76561199006140497.png]
Responder
#2
resetscore para pros pacman

Este plugin podría estar mejor...

Código PHP:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define adtime     600.0 //Default of 10 minuites

new pcvar_Advertise

enum Colors
{
    
Gris 33,
    
Rojo,
    
Azul
}

new 
g_maximumrs33 ];

public 
plugin_init()
{
    
register_plugin("resetscore""1.0""Ayuwoki")
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")  
    
    
//You may type /resetscore or /restartscore
    
register_clcmd("say /resetscore""reset_score")
    
register_clcmd("say /rs""reset_score")
    
register_clcmd("say  rs""reset_score")
    
register_clcmd("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""1")
    
//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
    
    /*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(id0)
    
set_user_frags(id0)
    
cs_set_user_deaths(id0)
    
set_user_frags(id0)

    if(
g_maximumrs[id] > 0) {
        
chatcolor(idRojo"!g[!nForce!g]!n SOLO PUEDES HACER UN !colorRS!n POR RONDA!")
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
g_maximumrs[id]++
        new 
name[33]
        
get_user_name(idname32)
        
chatcolor(idGris"!g[!nForce!g]!n !color%s !nHAS REINCIADO !colorSCORE"name)
    }
    return 
PLUGIN_HANDLED;
}


public 
client_putinserver(id)
{
    
set_task(0.2"chatcolor_send_teaminfo"id);

    if(
get_pcvar_num(pcvar_Advertise) == 1)
    {
        
set_task(10.0"connectmessage"id__"a"1)    
    }
}

public 
connectmessage(id)
{
    if(
is_user_connected(id))
    {
    
chatcolor(idGris"Escribe rs")
    }
}

stock chatcolor(idColors:colormsg[], any:...)
{
    static 
szMsg[191], msgSayText;
    
#define teaminfo_sent(%0) (TeamInfoSent & (1<<%0))

    
if (!msgSayText)
        
msgSayText get_user_msgid("SayText");

    
vformat(szMsg190msg4);

    
replace_all(szMsg190"!g""^4")
    
replace_all(szMsg190"!n""^1")
    
replace_all(szMsg190"!color""^3");
    
replace_all(szMsg190"!t2""^0")

    
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
    
write_byte(color ? (_:color) : 33);
    
write_string(szMsg);
    
message_end();
}

public 
chatcolor_send_teaminfo(id)
{
    if (!
is_user_connected(id))
        return;
    
    static 
msgTeamInfo;
    if (!
msgTeamInfo)
        
msgTeamInfo get_user_msgid("TeamInfo");
    
    static const 
pTeams[][] = { """TERRORIST""CT" };
    
    for (new 
pid 0pid 3pid++)
    {
        
message_begin(MSG_ONE_UNRELIABLEmsgTeamInfo, .player id)
        
write_byte(pid+33)
        
write_string(pTeams[pid])
        
message_end()
    }

Responder
#3
(06/12/2019, 10:03 PM)Chema escribió: resetscore para pros pacman

Este plugin podría estar mejor...

Código PHP:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define adtime     600.0 //Default of 10 minuites

new pcvar_Advertise

enum Colors
{
    
Gris 33,
    
Rojo,
    
Azul
}

new 
g_maximumrs33 ];

public 
plugin_init()
{
    
register_plugin("resetscore""1.0""Ayuwoki")
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")  
    
    
//You may type /resetscore or /restartscore
    
register_clcmd("say /resetscore""reset_score")
    
register_clcmd("say /rs""reset_score")
    
register_clcmd("say  rs""reset_score")
    
register_clcmd("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""1")
    
//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
    
    /*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(id0)
    
set_user_frags(id0)
    
cs_set_user_deaths(id0)
    
set_user_frags(id0)

    if(
g_maximumrs[id] > 0) {
        
chatcolor(idRojo"!g[!nForce!g]!n SOLO PUEDES HACER UN !colorRS!n POR RONDA!")
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
g_maximumrs[id]++
        new 
name[33]
        
get_user_name(idname32)
        
chatcolor(idGris"!g[!nForce!g]!n !color%s !nHAS REINCIADO !colorSCORE"name)
    }
    return 
PLUGIN_HANDLED;
}


public 
client_putinserver(id)
{
    
set_task(0.2"chatcolor_send_teaminfo"id);

    if(
get_pcvar_num(pcvar_Advertise) == 1)
    {
        
set_task(10.0"connectmessage"id__"a"1)    
    }
}

public 
connectmessage(id)
{
    if(
is_user_connected(id))
    {
    
chatcolor(idGris"Escribe rs")
    }
}

stock chatcolor(idColors:colormsg[], any:...)
{
    static 
szMsg[191], msgSayText;
    
#define teaminfo_sent(%0) (TeamInfoSent & (1<<%0))

    
if (!msgSayText)
        
msgSayText get_user_msgid("SayText");

    
vformat(szMsg190msg4);

    
replace_all(szMsg190"!g""^4")
    
replace_all(szMsg190"!n""^1")
    
replace_all(szMsg190"!color""^3");
    
replace_all(szMsg190"!t2""^0")

    
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTmsgSayText, .player id);
    
write_byte(color ? (_:color) : 33);
    
write_string(szMsg);
    
message_end();
}

public 
chatcolor_send_teaminfo(id)
{
    if (!
is_user_connected(id))
        return;
    
    static 
msgTeamInfo;
    if (!
msgTeamInfo)
        
msgTeamInfo get_user_msgid("TeamInfo");
    
    static const 
pTeams[][] = { """TERRORIST""CT" };
    
    for (new 
pid 0pid 3pid++)
    {
        
message_begin(MSG_ONE_UNRELIABLEmsgTeamInfo, .player id)
        
write_byte(pid+33)
        
write_string(pTeams[pid])
        
message_end()
    }


Gracias Chema Mariodance
Corazón I dream of someday being able to have your near. Corazón
[Imagen: 76561199006140497.png]
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)