It is currently 17 Jan 2019 21:15






Reply to topic  [ 3 posts ] 
 Modificare respawn! 
Author Message
Membru, skill +1
Membru, skill +1

Joined: 04 Apr 2017 23:42
Posts: 144
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: FURIE.ROYAL-GAMES.RO
Fond eXtream: 0
Salut , vreau si eu daca se poate sa modificati acest plugin, sa pot baga mapele in respawnmaps.ini ,sau ceva gen , si pe mapele care le bag acolo sa se activeze respawn automat , adica , cand se baga o mapa pe sv care e bagata acolo in acel ".ini" sa se activeze respawn automat si sa aibe mesaj in chat "[NUME.SERVER.RO : Jucam pe "%mapa jucata" , activez modul respawn]
las pluginul mai jos !
Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Respawn Status"
#define VERSION "1.0"

new g_bStatus;
public plugin_init()
{
   register_plugin(PLUGIN, VERSION, "FaTzZu")
   
   RegisterHam(Ham_Killed, "player", "Ham_PlayerKilled", 0);
   
   register_clcmd("say /respawn","cmdSayRespawn")
   register_clcmd("say_team /respawn","cmdSayRespawn")
}
public cmdSayRespawn(id)
{
   if(!(get_user_flags(id) & ADMIN_IMMUNITY))
   {
      client_print(id, print_chat, "Nu ai acces la comanda !");
      return PLUGIN_HANDLED;
   }
   new szText[192];
   new menu = menu_create("Change RESPAWN status", "handlerMenu");
   
   switch(g_bStatus)
   {
      case true: formatex(szText, 191, "RESPAWN - \yON")
      case false: formatex(szText, 191, "RESPAWN - \dOFF")
   }
   menu_additem(menu, szText, "1", 0)
   
   menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); 
   menu_display(id, menu, 0); 
   
   return PLUGIN_HANDLED;
}
public handlerMenu(id, menu, item) 

   if( item == MENU_EXIT ) 
   { 
      menu_destroy(menu); 
      return PLUGIN_HANDLED; 
   } 
   new data[6], iName[64]; 
   new access, callback; 
   menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); 
   new key = str_to_num(data); 
   
   switch(key) 
   {   
      case 1:
      {
         switch(g_bStatus)
         {
            case true: g_bStatus = false;
            case false: g_bStatus = true;
         }
         cmdSayRespawn(id);
      }
   }
   menu_destroy(menu); 
   return PLUGIN_HANDLED;
}
public Ham_PlayerKilled(victim, attacker, shouldgib)
{
   if(g_bStatus)
      set_task(1.0,"Respawn_Player", victim);
}
public Respawn_Player(id)
{
   ExecuteHam(Ham_CS_RoundRespawn, id)

_________________
DETINATOR :FURIEN.ROYAL-GAMES.RO


08 Jan 2019 15:00
Profile multumesc WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1678
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#pragma tabsize 0

#define PLUGIN "Respawn Status"
#define VERSION "1.0"

new g_bStatus,mapname[85]

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, "FaTzZu")
   
   RegisterHam(Ham_Killed, "player", "Ham_PlayerKilled", 0);
   
   register_clcmd("say /respawn","cmdSayRespawn")
   register_clcmd("say_team /respawn","cmdSayRespawn")

get_mapname(mapname,84)
}
public plugin_cfg()
{
      new filename[256]
      get_configsdir(filename,255)
      format(filename,255,"%s/respawnmaps.ini",filename)
      if(!file_exists(filename))   write_file(filename,"")
      new filepointer = fopen(filename,"rt")

      if(filepointer)
      {
         new readdata[128],parsedmaps[85]
         while(fgets(filepointer,readdata,127))
         {
            if(!readdata[0]||readdata[0]==';')   continue

            trim(readdata)
            parse(readdata,parsedmaps,84)

            if(equali(mapname,parsedmaps))
            {
               g_bStatus=true
               if(task_exists(1977))   set_task(15.0,"INFO",1977)

               break
            }
         }
         fclose(filepointer)
      }
}
public INFO()
{
   if(task_exists(1977))
   {
      client_print(0,print_chat,"[NUME.SERVER.RO : Jucam pe ^"%s^" , activez modul respawn]",mapname)
      remove_task(1977)
   }
}

public cmdSayRespawn(id)
{
   if(!(get_user_flags(id) & ADMIN_IMMUNITY))
   {
      client_print(id, print_chat, "Nu ai acces la comanda !");
      return PLUGIN_HANDLED;
   }
   new szText[192];
   new menu = menu_create("Change RESPAWN status", "handlerMenu");
   
   switch(g_bStatus)
   {
      case true: formatex(szText, 191, "RESPAWN - \yON")
      case false: formatex(szText, 191, "RESPAWN - \dOFF")
   }
   menu_additem(menu, szText, "1", 0)
   
   menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); 
   menu_display(id, menu, 0); 
   
   return PLUGIN_HANDLED;
}
public handlerMenu(id, menu, item) 

   if( item == MENU_EXIT ) 
   { 
      menu_destroy(menu); 
      return PLUGIN_HANDLED; 
   } 
   new data[6], iName[64]; 
   new access, callback; 
   menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); 
   new key = str_to_num(data); 
   
   switch(key) 
   {   
      case 1:
      {
         switch(g_bStatus)
         {
            case true: g_bStatus = false;
            case false: g_bStatus = true;
         }
         cmdSayRespawn(id);
      }
   }
   menu_destroy(menu); 
   return PLUGIN_HANDLED;
}
public Ham_PlayerKilled(victim, attacker, shouldgib)
{
   if(g_bStatus)
      set_task(1.0,"Respawn_Player", victim);
}
public Respawn_Player(id)
{
   ExecuteHam(Ham_CS_RoundRespawn, id)
}

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


08 Jan 2019 19:34
Profile multumesc ICQ YIM
Membru, skill +1
Membru, skill +1

Joined: 04 Apr 2017 23:42
Posts: 144
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: FURIE.ROYAL-GAMES.RO
Fond eXtream: 0
Adryy , functioneaza , mersi ,as mai avea nevoie de cateva modificari ... dar vreau sa nu fie public pluginul ! daca ma poti ajuta , platesc !

_________________
DETINATOR :FURIEN.ROYAL-GAMES.RO


08 Jan 2019 22:41
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 42 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