LevelMod Forum Index


LevelMod
Reply to topic
Reset Score
LordOfNothing
Developer
LordOfNothing
Joined: 29 Jul 2013
Posts: 71
Reply with quote
commands :

/rs
/reset
/resetscore

source :

Code:
#include <amxmodx>
#include <fun>
#include <cstrike>

#define AUTOR "LordOfNothing"
#define PLUGIN "Reset Score"
#define VERSION "1.0"

public plugin_init()
{
       
   register_plugin(PLUGIN, VERSION, AUTOR)
   register_clcmd("say /rs","pRESET")
   register_clcmd("say /reset","pRESET")
   register_clcmd("say /resetscore","pRESET")
   
}

public pRESET(id)
{
  new frags, deaths;
  frags = get_user_frags(id)
  deaths = cs_get_user_deaths(id)
 
    if(frags == 0 && deaths == 0)
    {
        client_print(id, print_chat, "[AMXX RESETSCORE] You cannot reset your score !")
       
    }else{
        client_print(id, print_chat, "[AMXX RESETSCORE] You succesfuly reset your score !")
        set_user_frags(id, 0)
        cs_set_user_deaths(id, 0)
        set_user_frags(id, 0)
        cs_set_user_deaths(id, 0)
    }
   
   
}
View user's profileSend private message
Reset Score
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT + 2 Hours  
Page 1 of 1  

  
  
 Reply to topic