It is currently 22 Feb 2019 20:29



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 3 posts ] 
 Cerere Plugin 
Author Message
Online
Membru, skill 0
Membru, skill 0

Joined: 13 Jan 2019 02:01
Posts: 33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Plugin Cerut: Doresc și eu acel Plugin in care scrii /FREE și îți dă 16000 odată la 24h
Descriere (adica ce face el mai exact): E un Plugin de FREE money odată la 24 de ore
Serverul ruleaza (HLDS/ReHLDS): ReHDLS
Versiune AMX Mod X: -
Modul Serverului: Furien


Last edited by Rainq on 17 Feb 2019 21:45, edited 1 time in total.

Editat dupa model



14 Feb 2019 00:38
Profile multumesc WWW
Super moderator
Super moderator
User avatar

Joined: 10 Jul 2013 20:26
Posts: 2387
Location: Constanta
Detinator Steam: Da
Detinator server CS: Da
Reputatie: Super moderator
Nume anterior: Do[N]e ;3
Fond eXtream: 0
| Afiseaza codul
#include<amxmodx> 
#include<cstrike>
#include<nvault>
#pragma tabsize 0

new money_amount,time_delete,g_Vault;
new const Tag[] = "[ServerName]";

public plugin_init()
{
register_plugin("Free Money","D3luxe","1.0");
register_clcmd("say /free","give_money");
money_amount = register_cvar("free_money_amount","16000");
time_delete = register_cvar("free_money_time","24");//this is in hours
}

public plugin_cfg()
{
g_Vault = nvault_open("SaveData");
if(g_Vault == INVALID_HANDLE)
set_fail_state("Error opening nVault");

nvault_prune(g_Vault,0,get_systime() - ((60 * 60) * get_pcvar_num(time_delete)));
}

public plugin_end()
{
nvault_close(g_Vault);
}

public give_money(id)
{
new name[33];
get_user_name(id,name,charsmax(name));
new iTimestamp , szVal[ 10 ];
if(!nvault_lookup( g_Vault , name , szVal , charsmax( szVal ) , iTimestamp ) || ( iTimestamp && ( ( get_systime() - iTimestamp ) >= ((60 * 60) * get_pcvar_num(time_delete)))))
{
nvault_set( g_Vault , name , "moneyFree" );
cs_set_user_money(id,get_pcvar_num(money_amount));
ChatColor(id,"!g%s!yYou just got 16000$ u can use this command again in !team24h",Tag);
}else{
ChatColor(id,"!g%s!yYou already used this command u need to wait at least !g24h !yto use it again.",Tag);
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}

//stock chatcolor
stock ChatColor(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();
}
}
}


14 Feb 2019 09:18
Profile multumesc
Moderator
Moderator
User avatar

Joined: 17 Dec 2013 19:51
Posts: 722
Location: New Orleans
Detinator Steam: Da
SteamID: /id/csall
Reputatie: Moderator
Fost Membru Club eXtreamCS (o luna)
Fond eXtream: 0
:ok_hand_tone2:
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <nvault>

#define NV_NAME "GET_MONEY"
#define TAG "[FURIEN]"

enum player_struct {
mtime,bool:ftime,key[64]
}
new g_player[33][player_struct];

new cvar_save_type,cvar_time,cvar_money;

public plugin_init() {

register_plugin("Get Money", "1.0", "");

cvar_save_type = register_cvar("get_money_save_type","1"); // how to save data 1 by authid, 2 by ip or 3 by name
cvar_time = register_cvar("get_money_minutes","1440"); // time in minutes, 720minutes=12hours it will be auto calculated
cvar_money = register_cvar("get_money","16000"); // how many money to give

register_clcmd("say /free", "cmd_money");
register_clcmd("say_team /free", "cmd_money");
}

public cmd_money(id) {

new nv = nvault_open(NV_NAME);

if(nv == INVALID_HANDLE) {
client_print(id,print_chat,"%s For the moment getting money system is inactive..",TAG);
return;
}

new txt_min[32],txt_money[10];
new money = get_pcvar_num(cvar_money),pminutes = get_pcvar_num(cvar_time);
copy(txt_money,charsmax(txt_money),(money==1)?"money":"money");
build_time(pminutes,txt_min,charsmax(txt_min));

if(g_player[id][ftime]) {
client_print(id,print_chat,"%s You have just received %d money %s, get another in %s !",TAG,money,txt_money,txt_min);
cs_set_user_money(id, cs_get_user_money(id) + money);
g_player[id][ftime]=false;
nvault_touch(nv,g_player[id][key],g_player[id][mtime]=get_systime());
return;
}

new user_time=get_systime()-g_player[id][mtime];
new diff_min=(user_time<(pminutes*60))?pminutes-(user_time/60):pminutes;
build_time(diff_min,txt_min,charsmax(txt_min));

if(user_time>=(pminutes*60)) {
client_print(id,print_chat,"%s You have just received %d money %s since %s passed !",TAG,money,txt_money,txt_min);
cs_set_user_money(id, cs_get_user_money(id) + money);
nvault_touch(nv,g_player[id][key],g_player[id][mtime]=get_systime());
}
else
client_print(id,print_chat,"%s Retry again in %s for getting %d more money %s !",TAG,txt_min,money,txt_money);

nvault_close(nv);
}

public client_putinserver(id) {

new nv,data[32];
get_auth(id,g_player[id][key],charsmax(g_player[][key]));
g_player[id][mtime]=get_systime();
g_player[id][ftime]=false;
formatex(data,charsmax(data),"%d",g_player[id][mtime]);

if((nv=nvault_open(NV_NAME))==INVALID_HANDLE)
return;

if(!nvault_lookup(nv,g_player[id][key],data,charsmax(data),g_player[id][mtime])) {
nvault_set(nv,g_player[id][key],data);
g_player[id][ftime]=true;
}

nvault_close(nv);
}

public client_disconnect(id) {

g_player[id][mtime]=0;
g_player[id][ftime]=false;
}

stock get_auth(id,data[],len)
switch(get_pcvar_num(cvar_save_type)) {
case 1: get_user_authid(id,data,len);
case 2: get_user_ip(id,data,len,1);
case 3: get_user_name(id,data,len);
}

stock build_time(pminutes,data[],len)
if(pminutes==1)
copy(data,len,"1 minute");
else if(pminutes!=1&&pminutes<60)
formatex(data,len,"%d minutes",pminutes);
else if(pminutes==60)
copy(data,len,"1 hour");
else {
new ptime=pminutes/60;
if(ptime*60==pminutes)
formatex(data,len,"%d %s",ptime,(ptime==1)?"hour":"hours");
else {
new diff=pminutes-ptime*60;
formatex(data,len,"%d %s and %d %s",ptime,(ptime==1)?"hour":"hours",diff,(diff==1)?"minute":"minutes");
}
}

_________________
[EXCHANGE] PaySafeCard => PayPal


15 Feb 2019 17:21
Profile multumesc
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: iriminescu0132 and 79 guests


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 post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group