Quantcast
Channel: Forum VeryGames
Viewing all articles
Browse latest Browse all 5196

Resetscore 1.1

$
0
0
Bonjour a tous alors voila sur mon serveur j'ai installer un resetscore et mon probleme est le suivant : les admins/staff ect ne peuvent pas !rs tandisque les autres oui je ne sait pas c'est du a quoi voici le code .sp
Code:

#include <sourcemod>
#include <sdktools>


#define PLUGIN_AUTHOR    "tuty"
#define PLUGIN_VERSION    "1.1"
#pragma semicolon 1


new Handle:gPluginEnabled = INVALID_HANDLE;


public Plugin:myinfo =
{
    name = "Resetscore",
    author = PLUGIN_AUTHOR,
    description = "Tapez !resetscore dans le tchat pour reset votre score.",
    version = PLUGIN_VERSION,
    url = "www.ligs.us"
};
public OnPluginStart()
{
    RegConsoleCmd( "say", CommandSay );
    RegConsoleCmd( "say_team", CommandSay );
   
    gPluginEnabled = CreateConVar( "sm_resetscore", "1" );
    CreateConVar( "resetscore_version", PLUGIN_VERSION, "Reset Score", FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY );
}
public Action:CommandSay( id, args )
{
    decl String:Said[ 128 ];
    GetCmdArgString( Said, sizeof( Said ) - 1 );
    StripQuotes( Said );
    TrimString( Said );
   
    if( StrEqual( Said, "!resetscore" ) || StrEqual( Said, "!rs" ) )
    {
        if( GetConVarInt( gPluginEnabled ) == 0 )
        {
            PrintToChat( id, "\x03[SM Resetscore] Le plugin est desactive." );
            PrintToConsole( id, "[SM Resetscore] Vous ne pouvez pas reset votre score le plugin est desactive!" );
       
            return Plugin_Continue;
        }
   
        if( !IsPlayerAlive( id ) )
        {
            PrintToChat( id, "\x03[SM Resetscore] Vous ne pouvez pas utiliser cette commande si vous etes mort." );
            PrintToConsole( id, "[SM Resetscore] Seul les joueurs vivant peuvent utiliser cette commande." );
       
            return Plugin_Continue;
        }


        if( GetClientDeaths( id ) == 0 && GetClientFrags( id ) == 0 )
        {
            PrintToChat( id, "\x03[SM Resetscore] Votre score est deja 0!" );
            PrintToConsole( id, "[SM Resetscore] Vous ne pouvez pas reset votre score pour le moment." );
           
            return Plugin_Continue;
        }
               
        SetClientFrags( id, 0 );
        SetClientDeaths( id, 0 );
   
        decl String:Name[ 32 ];
        GetClientName( id, Name, sizeof( Name ) - 1 );
   
        PrintToChat( id, "\x03[SM Resetscore] Vous avez reset votre score avec succes !" );
        PrintToChatAll( "\x03[SM Resetscore] %s vient de reset son score.", Name );
        PrintToConsole( id, "[SM Resetscore] Vous avez reset votre score avec succes." );
    }
   
    return Plugin_Continue;
}   
stock SetClientFrags( index, frags )
{
    SetEntProp( index, Prop_Data, "m_iFrags", frags );
    return 1;
}
stock SetClientDeaths( index, deaths )
{
    SetEntProp( index, Prop_Data, "m_iDeaths", deaths );
    return 1;
}

Merci d'avance

Brµx

Viewing all articles
Browse latest Browse all 5196

Trending Articles


Girasoles para colorear


mayabang Quotes, Torpe Quotes, tanga Quotes


Tagalog Quotes About Crush – Tagalog Love Quotes


OFW quotes : Pinoy Tagalog Quotes


Long Distance Relationship Tagalog Love Quotes


Tagalog Quotes To Move on and More Love Love Love Quotes


5 Tagalog Relationship Rules


Best Crush Tagalog Quotes And Sayings 2017


Re:Mutton Pies (lleechef)


FORECLOSURE OF REAL ESTATE MORTGAGE


Sapos para colorear


tagalog love Quotes – Tiwala Quotes


Break up Quotes Tagalog Love Quote – Broken Hearted Quotes Tagalog


Patama Quotes : Tagalog Inspirational Quotes


Pamatay na Banat and Mga Patama Love Quotes


Tagalog Long Distance Relationship Love Quotes


BARKADA TAGALOG QUOTES


“BAHAY KUBO HUGOT”


Vimeo 10.7.0 by Vimeo.com, Inc.


Vimeo 10.7.1 by Vimeo.com, Inc.