It is currently 17 Jan 2019 06:53






Reply to topic  [ 4 posts ] 
 Modificare plugin /spec /t /ct 
Author Message
Membru, skill 0
Membru, skill 0

Joined: 26 Jun 2018 02:10
Posts: 29
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Am nevoie sa modific acest plugin, adica sa ii bag pistol si respawn automat cand scriu /t sau /ct.
| Afiseaza codul
#include < amxmodx >

#include < cstrike >

#include < csdm >



public plugin_init ()

{

register_plugin ("CSDM Change Team" , "1" , "daNzEt")



register_clcmd ("say /spec" , "cmdSpec")

register_clcmd ("say_team /spec" , "cmdSpec")

register_clcmd ("say /cs" , "cmdCs")

register_clcmd ("say_team /cs" , "cmdCs")

register_clcmd ("say /ct" , "ct")

register_clcmd ("say_team /ct" , "ct")

register_clcmd ("say /t" , "t")

register_clcmd ("say_team /t" , "t")



}



public plugin_modules ()

{

require_module ("CSTRIKE")

require_module ("CSDM")

}



public cmdSpec (x)

{

new name[32]

get_user_name(x, name, 31)



cs_set_user_team (x , CS_TEAM_SPECTATOR)

user_silentkill (x)



chat_color( 0, "!t[eXtreamCS] !nJucatorul !g%s !ns-a mutat unde vrea :)", name )

}



public cmdCs (x)

{

new name[32]

get_user_name(x, name, 31)



cs_set_user_team (x , random_num (1, 2))

csdm_respawn (x)



chat_color( 0, "!t[eXtreamCS] !nJucatorul !g%s !ns-a mutat la joc", name )

}



public ct(id)

{

new name[32]

get_user_name(id, name, 31)



cs_set_user_team(id , CS_TEAM_CT)

user_silentkill (id)



chat_color( 0, "!t[eXtreamCS] !nJucatorul !g%s !ns-a mutat la CT", name )

}



public t(id)

{

new name[32]

get_user_name(id, name, 31)



cs_set_user_team(id,CS_TEAM_T)

user_silentkill (id)



chat_color( 0, "!t[eXtreamCS] !nJucatorul !g%s !ns-a mutat la echipa T", name )

}



stock chat_color(const id, const input[], any:...)

{

new count = 1, players[32]

static msg[320]

vformat(msg, 190, input, 3)



replace_all(msg, 190, "!g", "^4")

replace_all(msg, 190, "!n", "^1")

replace_all(msg, 190, "!t", "^3")

replace_all(msg, 190, "!t2", "^0")



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()

}

}

}

} [/Sursa=]



Acesta este pluginul din care vreau pistol si respawn, am incercat dar imi da eroare la copile.




[Sursa=] /* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "Spec Switch"
#define VERSION "0.1.3"
#define AUTHOR "many"

new CsTeams:zTeam[33]
new zDeath[33]
new bool:type_spec[33] = false
new g_cvar

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
/* Cvar */
g_cvar = register_cvar("amx_specmode", "0") // 0 - enable use to all, 1 - enable use only ADMINs
/* Client Commands */
register_clcmd("say /spec", "cmdSpec", ADMIN_ALL, "- go to spectator")
register_clcmd("say_team /spec", "cmdSpec", ADMIN_ALL, "- go to spectator")
register_clcmd("say /back", "cmdBack", ADMIN_ALL, "- go back to your team")
register_clcmd("say_team /back", "cmdBack", ADMIN_ALL, "- go back to your team")
}

public cmdSpec(id)
{
if(!get_pcvar_num(g_cvar)) Spec(id)
else if( get_pcvar_num(g_cvar) && (get_user_flags(id) & ADMIN_KICK)) Spec(id)
else if( get_pcvar_num(g_cvar) && !(get_user_flags(id) & ADMIN_KICK)) PrintUserNotAdmin(id)
}

public cmdBack(id)
{
if (type_spec[id] && cs_get_user_team(id) == CS_TEAM_SPECTATOR && zTeam[id] != CS_TEAM_SPECTATOR ) Back(id)
else if( get_pcvar_num(g_cvar) && !(get_user_flags(id) & ADMIN_KICK) ) PrintUserNotAdmin(id)
}

public Spec(id)
{
zDeath[id] = cs_get_user_deaths(id)
if (cs_get_user_team(id) == CS_TEAM_SPECTATOR)
return
else{
type_spec[id] = true
zTeam[id] = cs_get_user_team(id)
cs_set_user_team(id, CS_TEAM_SPECTATOR)
user_silentkill(id)
client_print(id,print_chat,"Type /back to return from Spectator")
}
return
}

public Back(id)
{
cs_set_user_team(id, zTeam[id])
cs_set_user_deaths(id, zDeath[id])
set_task(0.5,"FirstRespawn",id)
set_task(0.8,"SecondRespawn",id)
}

public FirstRespawn(id)
{
cs_user_spawn(id)
}

public SecondRespawn(id)
{
cs_user_spawn(id)
if (cs_get_user_team(id) == CS_TEAM_T){
give_item(id,"weapon_knife")
give_item(id,"weapon_glock18")
give_item(id,"ammo_9mm")
}
if (cs_get_user_team(id) == CS_TEAM_CT){
give_item(id,"weapon_knife")
give_item(id,"weapon_usp")
give_item(id,"ammo_45acp")
give_item(id,"ammo_45acp")
}
}

PrintUserNotAdmin(id)
{
client_print(id,print_chat,"Only Admins can use /spec, /back command")
}

public PrintRule(id)
{
if ( is_user_connected(id) && !is_user_bot(id) && !is_user_hltv(id) ){
client_print(id,print_chat,"Type /spec if you want to go Spectator")
client_print(id,print_chat,"Type /back to return from Spectator")
}
}

public client_putinserver(id)
{
if(!get_pcvar_num(g_cvar)) Rule(id)
else if( get_pcvar_num(g_cvar) && (get_user_flags(id) & ADMIN_KICK)) Rule(id)
}

public client_disconnect(id) type_spec[id] = false
public client_connect(id) type_spec[id] = false
public Rule(id) set_task(20.0, "PrintRule", id)

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n{\\ colortbl ;\\ red0\\ green0\\ blue0;}\n\\ viewkind4\\ uc1\\ pard\\ cf1\\ lang1033\\ b\\ f0\\ fs16 \n\\ par }
*/

O modificare la acest plugin va rog, vreau sa ii adaug pistol si respawn automat. Aveti pluginul de jos cu sursa.
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "Spec Switch"
#define VERSION "0.1.3"
#define AUTHOR "many"

new CsTeams:zTeam[33]
new zDeath[33]
new bool:type_spec[33] = false
new g_cvar

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
/* Cvar */
g_cvar = register_cvar("amx_specmode", "0") // 0 - enable use to all, 1 - enable use only ADMINs
/* Client Commands */
register_clcmd("say /spec", "cmdSpec", ADMIN_ALL, "- go to spectator")
register_clcmd("say_team /spec", "cmdSpec", ADMIN_ALL, "- go to spectator")
register_clcmd("say /back", "cmdBack", ADMIN_ALL, "- go back to your team")
register_clcmd("say_team /back", "cmdBack", ADMIN_ALL, "- go back to your team")
}

public cmdSpec(id)
{
if(!get_pcvar_num(g_cvar)) Spec(id)
else if( get_pcvar_num(g_cvar) && (get_user_flags(id) & ADMIN_KICK)) Spec(id)
else if( get_pcvar_num(g_cvar) && !(get_user_flags(id) & ADMIN_KICK)) PrintUserNotAdmin(id)
}

public cmdBack(id)
{
if (type_spec[id] && cs_get_user_team(id) == CS_TEAM_SPECTATOR && zTeam[id] != CS_TEAM_SPECTATOR ) Back(id)
else if( get_pcvar_num(g_cvar) && !(get_user_flags(id) & ADMIN_KICK) ) PrintUserNotAdmin(id)
}

public Spec(id)
{
zDeath[id] = cs_get_user_deaths(id)
if (cs_get_user_team(id) == CS_TEAM_SPECTATOR)
return
else{
type_spec[id] = true
zTeam[id] = cs_get_user_team(id)
cs_set_user_team(id, CS_TEAM_SPECTATOR)
user_silentkill(id)
client_print(id,print_chat,"Type /back to return from Spectator")
}
return
}

public Back(id)
{
cs_set_user_team(id, zTeam[id])
cs_set_user_deaths(id, zDeath[id])
set_task(0.5,"FirstRespawn",id)
set_task(0.8,"SecondRespawn",id)
}

public FirstRespawn(id)
{
cs_user_spawn(id)
}

public SecondRespawn(id)
{
cs_user_spawn(id)
if (cs_get_user_team(id) == CS_TEAM_T){
give_item(id,"weapon_knife")
give_item(id,"weapon_glock18")
give_item(id,"ammo_9mm")
}
if (cs_get_user_team(id) == CS_TEAM_CT){
give_item(id,"weapon_knife")
give_item(id,"weapon_usp")
give_item(id,"ammo_45acp")
give_item(id,"ammo_45acp")
}
}

PrintUserNotAdmin(id)
{
client_print(id,print_chat,"Only Admins can use /spec, /back command")
}

public PrintRule(id)
{
if ( is_user_connected(id) && !is_user_bot(id) && !is_user_hltv(id) ){
client_print(id,print_chat,"Type /spec if you want to go Spectator")
client_print(id,print_chat,"Type /back to return from Spectator")
}
}

public client_putinserver(id)
{
if(!get_pcvar_num(g_cvar)) Rule(id)
else if( get_pcvar_num(g_cvar) && (get_user_flags(id) & ADMIN_KICK)) Rule(id)
}

public client_disconnect(id) type_spec[id] = false
public client_connect(id) type_spec[id] = false
public Rule(id) set_task(20.0, "PrintRule", id)

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n{\\ colortbl ;\\ red0\\ green0\\ blue0;}\n\\ viewkind4\\ uc1\\ pard\\ cf1\\ lang1033\\ b\\ f0\\ fs16 \n\\ par }
*/

Multumesc eXtreamCS :smiley:


08 Jan 2019 23:48
Profile multumesc WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1673
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
1 cerere 1 plugin,alege

_________________
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 .


09 Jan 2019 19:31
Profile multumesc ICQ YIM
Membru, skill 0
Membru, skill 0

Joined: 26 Jun 2018 02:10
Posts: 29
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Vreau din al 2-lea plugin sa iau pistol si respawn la comanda /ct /t pentru primul plugin, deoarece primul plugin nu ruleaza pe respawn la comanda /ct /t. Deci primul plugin il vreau cu pistol la spawn cu comanda /ct /t
Multumesc eXtreamCs :smiley:


09 Jan 2019 19:43
Profile multumesc WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

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

#pragma tabsize 0

new name[32]

public plugin_init ()
{
   register_plugin ("CSDM Change Team" , "1" , "daNzEt")

     register_clcmd ("say /spec" , "cmdSpec")
     register_clcmd ("say_team /spec" , "cmdSpec")

     register_clcmd ("say /cs" , "cmdCs")
     register_clcmd ("say_team /cs" , "cmdCs")

   register_clcmd ("say /ct" , "ct")
      register_clcmd ("say_team /ct" , "ct")

       register_clcmd ("say /t" , "t")
       register_clcmd ("say_team /t" , "t")
 
}

public plugin_modules ()   require_module ("CSDM")

public cmdSpec (x)
{
if(cs_get_user_team(x)==CS_TEAM_SPECTATOR)   return
   get_user_name(x, name, 31)
     cs_set_user_team (x , CS_TEAM_SPECTATOR)
     if(is_user_alive(x))   user_silentkill (x)
   chat_color( 0, "!t[eXtreamCS] !nJucatorul !g%s !ns-a mutat unde vrea :)", name )
}

public cmdCs (x)
{
if(cs_get_user_team(x)!=CS_TEAM_SPECTATOR)   return
   get_user_name(x, name, 31)
     cs_set_user_team (x , random_num (1, 2))
     csdm_respawn (x)
   chat_color( 0, "!t[eXtreamCS] !nJucatorul !g%s !ns-a mutat la joc", name )
}

public ct(id)
{
if(cs_get_user_team(id)==CS_TEAM_CT)   return
   get_user_name(id, name, 31)
   cs_set_user_team(id , CS_TEAM_CT)
if(is_user_alive(id))   user_silentkill (id)
csdm_respawn (id)
   chat_color( 0, "!t[eXtreamCS] !nJucatorul !g%s !ns-a mutat la CT", name )
}

public t(id)
{
if(cs_get_user_team(id)==CS_TEAM_T)   return
   get_user_name(id, name, 31)
       cs_set_user_team(id,CS_TEAM_T)
if(is_user_alive(id))   user_silentkill (id)
csdm_respawn (id)
   chat_color( 0, "!t[eXtreamCS] !nJucatorul !g%s !ns-a mutat la echipa T", name )
}

stock chat_color(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[320]
   vformat(msg, 190, input, 3)
   replace_all(msg, 190, "!g", "^4")
   replace_all(msg, 190, "!n", "^1")
   replace_all(msg, 190, "!t", "^3")
   replace_all(msg, 190, "!t2", "^0")
   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()
         }
      }
   }
}

_________________
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 .


09 Jan 2019 20:29
Profile multumesc ICQ YIM
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

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