cerere modificare plugin free

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
sssss
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 63
Joined: 15 Dec 2021, 20:14
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 4 times
Been thanked: 1 time

14 Feb 2022, 19:15

am acest plugin pentru furien. free 16k odata pe ora
se poate salva pe steamid timpul adica 60 de minute ?
pentru ca imi pot schimba numele si pot da free intr-una
| Afiseaza codul
#include<amxmodx>
#include<cstrike>
#include<nvault>
#pragma tabsize 0

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

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","1");//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 !yAi primit!g 16000$!y , mai poti incerca peste o ora.",Tag);
   }else{
      ChatColor(id,"!g%s !yDeja ai folosit aceasta comanda, mai asteapta o ora.",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))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
RoyalServer
User avatar
kidd0x
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1054
Joined: 06 Oct 2018, 14:41
Detinator Steam: Da
SteamID: /id/kidd0x/
Reputatie: Utilizator neserios (tepar!)
Fond eXtream: 0
Location: Constangeles
Discord: kidd0x
Has thanked: 172 times
Been thanked: 81 times

14 Feb 2022, 19:47

Code: Select all

#include<amxmodx>
#include<cstrike>
#include<nvault>
#pragma tabsize 0

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

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","1");//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 steamid[24];
   get_user_authid(id,steamid,charsmax(steamid));
   new iTimestamp , szVal[ 10 ];
   if(!nvault_lookup( g_Vault , steamid, 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 !yAi primit!g 16000$!y , mai poti incerca peste o ora.",Tag);
   }else{
      ChatColor(id,"!g%s !yDeja ai folosit aceasta comanda, mai asteapta o ora.",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))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
User avatar
sssss
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 63
Joined: 15 Dec 2021, 20:14
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 4 times
Been thanked: 1 time

14 Feb 2022, 21:17

N3v3rM1nd wrote:
14 Feb 2022, 19:47

Code: Select all

#include<amxmodx>
#include<cstrike>
#include<nvault>
#pragma tabsize 0

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

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","1");//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 steamid[24];
   get_user_authid(id,steamid,charsmax(steamid));
   new iTimestamp , szVal[ 10 ];
   if(!nvault_lookup( g_Vault , steamid, 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 !yAi primit!g 16000$!y , mai poti incerca peste o ora.",Tag);
   }else{
      ChatColor(id,"!g%s !yDeja ai folosit aceasta comanda, mai asteapta o ora.",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))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
free.sma(36) : error 017: undefined symbol "steamid"
free.sma(36) : error 035: argument type mismatch (argument 3)
User avatar
kidd0x
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1054
Joined: 06 Oct 2018, 14:41
Detinator Steam: Da
SteamID: /id/kidd0x/
Reputatie: Utilizator neserios (tepar!)
Fond eXtream: 0
Location: Constangeles
Discord: kidd0x
Has thanked: 172 times
Been thanked: 81 times

14 Feb 2022, 22:55

....

Code: Select all

#include<amxmodx>
#include<cstrike>
#include<nvault>
#pragma tabsize 0

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

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","1");//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 steamid[24];
   get_user_authid(id,steamid,charsmax(steamid));
   new iTimestamp , szVal[ 10 ];
   if(!nvault_lookup( g_Vault , steamid, szVal , charsmax( szVal ) , iTimestamp ) || ( iTimestamp && ( ( get_systime() - iTimestamp ) >= ((60 * 60) * get_pcvar_num(time_delete)))))
   {
      nvault_set( g_Vault , steamid , "moneyFree" );
      cs_set_user_money(id,get_pcvar_num(money_amount));
      ChatColor(id,"!g%s !yAi primit!g 16000$!y , mai poti incerca peste o ora.",Tag);
   }else{
      ChatColor(id,"!g%s !yDeja ai folosit aceasta comanda, mai asteapta o ora.",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))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
            write_byte(players);
            write_string(msg);
            message_end();
         }
      }
   }
}
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests