It is currently 22 Feb 2019 20:45



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  [ 6 posts ] 
 [Cerere Plugin] Bonus pe timp jucat 
Author Message
Membru, skill 0
Membru, skill 0
User avatar

Joined: 14 Sep 2018 22:35
Posts: 74
Location: Timisoara
Detinator Steam: Da
CS Status: Sniper & Rifler
Fond eXtream: 0
Plugin Cerut: Bonus pe timp
Descriere (adica ce face el mai exact): am cautat peste tot si nu gasesc, vreau si eu pluginul ala de iti da bonus cand faci 15,30,xx minute pe server, dar eu vreau sa-ti dea aceasi suma de bani din ora in ora daca se poate
Serverul ruleaza (HLDS/ReHLDS): -
Versiune AMX Mod X: -
Modul Serverului: bb

_________________
maybe there are no goodbyes..


09 Feb 2019 02:54
Profile multumesc
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1952
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Fond eXtream: 0
| Afiseaza codul
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>

#define PLUGIN "FCS PlayedTime Reward"
#define VERSION "1.2.0"  // 1.x.x  noi verificari/imbunatatiri

#define TASK_PTR   06091993

enum Color
{
   NORMAL = 1,       // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
   GREEN,          // Culoare Verde.
   TEAM_COLOR,       // Culoare Rosu, Albastru, Gri.
   GREY,          // Culoarea Gri.
   RED,          // Culoarea Rosu.
   BLUE,          // Culoarea Albastru.
}

new TeamName[  ][  ] =
{
   "",
   "TERRORIST",
   "CT",
   "SPECTATOR"
}


new const g_szTag[ ] = "[Furien Credits]";

new g_iCvarPTREnable;
new g_iCvarPTRMinutes;
new g_iCvarPTRCredits;

new g_iUserTime[ 33 ];

public plugin_init( )
{
   register_plugin( PLUGIN, VERSION, "Askhanar" );
   
   g_iCvarPTREnable = register_cvar( "fcs_ptr_enable", "1" );
   g_iCvarPTRMinutes = register_cvar( "fcs_ptr_minutes", "5" );
   g_iCvarPTRCredits = register_cvar( "fcs_ptr_credits", "15" );
   
   set_task( 1.0, "task_Time", TASK_PTR, _, _, "b", 0 );
   // Add your code here...
}



public client_putinserver( id )
{
   if( is_user_bot( id ) || is_user_hltv( id ) )
      return PLUGIN_CONTINUE;
   
   g_iUserTime[ id ] = 0;
   
   return PLUGIN_CONTINUE;
}

public client_disconnect( id )
{
   if( is_user_bot( id ) || is_user_hltv( id ) )
      return PLUGIN_CONTINUE;
      
   g_iUserTime[ id ] = 0;
   
   return PLUGIN_CONTINUE;
}

public task_PTRFunction( )
{
   if( get_pcvar_num( g_iCvarPTREnable ) != 1 )
      return;
      
   static iPlayers[ 32 ];
   static iPlayersNum;
   
   get_players( iPlayers, iPlayersNum, "ch" );
   if( !iPlayersNum )
      return;
   
   static id, i;
   for( i = 0; i < iPlayersNum; i++ )
   {
      id = iPlayers[ i ];
      
      g_iUserTime[ id ]++;
      
      new iTime;
      iTime = get_pcvar_num( g_iCvarPTRMinutes ) ;
      
      if( g_iUserTime[ id ] >= iTime * 60 )
      {
         g_iUserTime[ id ] -= iTime * 60;
         
         new iCredits = get_pcvar_num( g_iCvarPTRCredits );
         
         cs_set_user_money( id, cs_get_user_money(id)+iCredits );
         ColorChat( id, RED, "^x04%s^x01 Ai primit^x03 %d^x01$ pentru^x03 %i^x01 minute jucate!",
            g_szTag, iCredits, iTime );
            
      }
   }
   
}


ColorChat(  id, Color:iType, const msg[  ], { Float, Sql, Result, _}:...  )
{
   
   // Daca nu se afla nici un jucator pe server oprim TOT. Altfel dam de erori..
   if( !get_playersnum( ) ) return;
   
   new szMessage[ 256 ];

   switch( iType )
   {
       // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
      case NORMAL:   szMessage[ 0 ] = 0x01;
      
      // Culoare Verde.
      case GREEN:   szMessage[ 0 ] = 0x04;
      
      // Alb, Rosu, Albastru.
      default:    szMessage[ 0 ] = 0x03;
   }

   vformat(  szMessage[ 1 ], 251, msg, 4  );

   // Ne asiguram ca mesajul nu este mai lung de 192 de caractere.Altfel pica server-ul.
   szMessage[ 192 ] = '^0';
   

   new iTeam, iColorChange, iPlayerIndex, MSG_Type;
   
   if( id )
   {
      MSG_Type  =  MSG_ONE_UNRELIABLE;
      iPlayerIndex  =  id;
   }
   else
   {
      iPlayerIndex  =  CC_FindPlayer(  );
      MSG_Type = MSG_ALL;
   }
   
   iTeam  =  get_user_team( iPlayerIndex );
   iColorChange  =  CC_ColorSelection(  iPlayerIndex,  MSG_Type, iType);

   CC_ShowColorMessage(  iPlayerIndex, MSG_Type, szMessage  );
      
   if(  iColorChange  )   CC_Team_Info(  iPlayerIndex, MSG_Type,  TeamName[ iTeam ]  );

}

CC_ShowColorMessage(  id, const iType, const szMessage[  ]  )
{
   
   static bool:bSayTextUsed;
   static iMsgSayText;
   
   if(  !bSayTextUsed  )
   {
      iMsgSayText  =  get_user_msgid( "SayText" );
      bSayTextUsed  =  true;
   }
   
   message_begin( iType, iMsgSayText, _, id  );
   write_byte(  id  )      
   write_string(  szMessage  );
   message_end(  );
}

CC_Team_Info( id, const iType, const szTeam[  ] )
{
   static bool:bTeamInfoUsed;
   static iMsgTeamInfo;
   if(  !bTeamInfoUsed  )
   {
      iMsgTeamInfo  =  get_user_msgid( "TeamInfo" );
      bTeamInfoUsed  =  true;
   }
   
   message_begin( iType, iMsgTeamInfo, _, id  );
   write_byte(  id  );
   write_string(  szTeam  );
   message_end(  );

   return 1;
}

CC_ColorSelection(  id, const iType, Color:iColorType)
{
   switch(  iColorType  )
   {
      
      case RED:   return CC_Team_Info(  id, iType, TeamName[ 1 ]  );
      case BLUE:   return CC_Team_Info(  id, iType, TeamName[ 2 ]  );
      case GREY:   return CC_Team_Info(  id, iType, TeamName[ 0 ]  );

   }

   return 0;
}

CC_FindPlayer(  )
{
   new iMaxPlayers  =  get_maxplayers(  );
   
   for( new i = 1; i <= iMaxPlayers; i++ )
      if(  is_user_connected( i )  )
         return i;
   
   return -1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ froman\\ fcharset0 Times New Roman;}}\n{\\ colortbl ;\\ red0\\ green0\\ blue0;}\n\\ viewkind4\\ uc1\\ pard\\ cf1\\ lang11274\\ f0\\ fs24 \n\\ par }
*/


09 Feb 2019 15:11
Profile multumesc ICQ YIM
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
Cauta pe google "time reward plugin cs 1.6"


09 Feb 2019 19:37
Profile multumesc
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 10 Oct 2014 05:21
Posts: 3582
Location: Roman, Neamț
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Scripter eXtreamCS
Moderator ajutator
Membru Club eXtreamCS (6 luni)
Fond eXtream: 0
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fvault>

#define SVR_VAULT "ore"

new g_iHours[33];
new g_name[33][32];

public plugin_init() set_task(3600.0, "add_hour", .flags="b");
public add_hour()
{
static players; players = get_maxplayers();

for(new i = 0; i <= players; i++)
{
g_iHours[i]++;
}
}

public client_connect(id)
{
if(is_user_bot(id) || is_user_hltv(id))
return;

new szData[16];
get_user_name(id, g_name[id], charsmax(g_name));

if(fvault_get_data(SVR_VAULT, g_name[id], szData, charsmax(szData)))
{
g_iHours[id] = str_to_num(szData);
}
}

public client_disconnect(id)
{
if(is_user_bot(id) || is_user_hltv(id))
return;

fvault_set_data(SVR_VAULT, g_name[id], g_iHours[id]);
}


la fiecare ora se adauga cate o ora si se salveaza. ai nevoie de fvault.

_________________
METODA BOOST/DROP 2018 GRATUITA (pentru CS 1.6)
AMX XMAS Gifts 2.0 - Private Plugin
AMX Christmass Addons (2019)
[VAND] Addons Zombie v7.1 (Release 10 February 2018)[/center]


12 Feb 2019 01:45
Profile multumesc
Membru, skill 0
Membru, skill 0
User avatar

Joined: 14 Sep 2018 22:35
Posts: 74
Location: Timisoara
Detinator Steam: Da
CS Status: Sniper & Rifler
Fond eXtream: 0
deci am incercat sa fac eu ceva, dar am o problema pe care n-o pot rezolva nicidecum
Code:
#include <amxmodx>
#include <cstrike>
#include <colorchat>

new cvar_time;
new sum;
new gKillerPoints[33];

public plugin_init()
{
   register_plugin("Points Per Time","1.1","unknown.");
   
   cvar_time = register_cvar("mt_time","60.0")
   sum = register_cvar("mt_money","3")
   
}

public client_putinserver(id) {
   set_task(get_pcvar_float(cvar_time),"function_give_money",0,"",0,"b",id)
}

public function_give_money(id)
{
   gKillerPoints[id] = gKillerPoints[id] + get_pcvar_num(sum);
   ColorChat(id, GREEN, "[BaseBuilder Points]^1 You are awarded with ^4%i points^1 for playing 1hour on server.",get_pcvar_num(sum));
   return PLUGIN_CONTINUE
}


deci eu nu vreau sa de-a bani, ci puncte folosind new gKillerPoints[33]; dar am incercat tot ce am stiut si tot ce am putut gasii pe net si nu imi da puncte daca joc, se poate rezolva sa-ti dea punctele alea? si daca crezi ca e posibil sa adaugi si ce London a scris cu fvault? eu nu prea ma am cu asta, multumesc mult!!

_________________
maybe there are no goodbyes..


22 Feb 2019 17:22
Profile multumesc
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1952
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Fond eXtream: 0
ai nevoie de un plugin de bază pentru acele puncte..(native)


22 Feb 2019 18:46
Profile multumesc ICQ YIM
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: Boss de Boss, 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