Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Nowy Plugin

Prosba o polaczenie 3 pluginow w jeden

Nowy Plugin

  • Zamknięty Temat jest zamknięty
3 odpowiedzi w tym temacie

#1 Grycuk

    Zaawansowany

  • Użytkownik

Reputacja: 17
Początkujący

  • Postów:113
  • GG:
  • Steam:steam
  • Imię:Kamil
  • Lokalizacja:Minsk Mazowiecki
Offline

Napisano 05.06.2009 12:57

Chodzi mi o zrobienie rozgrzewki na same deagle przez 60 sekund z respawnem

plugin rundy rozgrzewkowej:
#include <amxmodx>
#include <amxmisc>

// Plugin Version
#define VERSION "1.7"

// Define the access for admin commands
#define ACCESS ADMIN_KICK

new Float:g_LastRestart[33];

// Count cvars
new cvar_enabled;
new map[32]
new cvar_hostname;
new cvar_time;
new say_text;


public plugin_init()
{
// Register plugin
register_plugin("Round Restart", VERSION, "xxxx");

// Register plugin version
register_cvar("restart_version", VERSION, FCVAR_SERVER|FCVAR_SPONLY);
set_cvar_string("restart_version", VERSION);

// Register admin commands
register_clcmd("say /rrlive","say_restart",ACCESS)
register_clcmd("say_team /rrlive","say_restart",ACCESS)
register_clcmd("say /rr","say_restart",ACCESS)
register_clcmd("say_team /rr","say_restart",ACCESS)
register_clcmd("say /live","say_restart",ACCESS)
register_clcmd("say_team /live","say_restart",ACCESS)
register_clcmd("say /restart","say_restart",ACCESS)
register_clcmd("say_team /restart","say_restart",ACCESS)

// Register language file
register_dictionary("round_restart.txt");

// Enable/Disable plugin ingame from server console
cvar_enabled = register_cvar("restart_enabled","1" );

if(!get_pcvar_num(cvar_enabled))
return

// Register plugin cvars
cvar_time = register_cvar("restart_waittime","60.0" );
cvar_hostname = get_cvar_pointer("hostname");

say_text = get_user_msgid("SayText");
get_mapname(map, charsmax(map));


}

public say_restart(id,level,cid )
{
if(!cmd_access(id,level,cid,2))
{
return PLUGIN_CONTINUE;
}
new Float:Time = get_gametime();

if(Time - g_LastRestart[id] < get_pcvar_float(cvar_time))
{
client_printc(id,"%L", id, "RR_WAIT");
return PLUGIN_CONTINUE;
}
g_LastRestart[id] = Time;

new hostname[64];
get_pcvar_string(cvar_hostname, hostname, charsmax(hostname));

server_cmd("sv_restart 5")
client_printc(0, "%L", id, "RR_MSG", hostname);
client_printc(0, "%L", id, "RR_MSG2", map);
client_printc(0, "%L", id, "RR_MSG3");
client_printc(0, "%L", id, "RR_MSG4");
client_cmd(0, "speak ^"loading environment^"");

return PLUGIN_CONTINUE;
}

stock client_printc(const id, const string[], {Float, Sql, Resul,_}:...) {

new msg[191], players[32], count = 1;
vformat(msg, sizeof msg - 1, string, 3);

replace_all(msg,190,"!g","^4");
replace_all(msg,190,"!y","^1");
replace_all(msg,190,"!t","^3");

if(id)
players[0] = id;
else
get_players(players,count,"ch");

new index;
for (new i = 0 ; i < count ; i++)
{
index = players[i];
message_begin(MSG_ONE_UNRELIABLE, say_text,_, index);
write_byte(index);
write_string(msg);
message_end();
}
}


Plugin respawnu:


#include <amxmodx>
#include <cstrike>

#define PLUGIN "Respawn"
#define VERSION "0.1"
#define AUTHOR "xxxxx"

new bool:g_bActive;

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);
register_event("DeathMsg","Event_DeathMsg","a");
register_clcmd("say /respawn","ClCmd_Respawn");
}

public plugin_cfg()
{
new szMap[64];
get_mapname(szMap,63);

if(containi(szMap,"surf_")!=-1)
{
g_bActive = true;
}
else
{
g_bActive = false;
}
}

public Event_DeathMsg()
{
if(g_bActive == false)
return;

new id = read_data(2);
set_task(0.3,"Respawn",id);
}

public ClCmd_Respawn(id)
{
if(is_user_alive(id) || !g_bActive)
return PLUGIN_CONTINUE;

set_task(0.3,"Respawn",id);

return PLUGIN_CONTINUE;
}

public Respawn(id)
{
cs_user_spawn(id);
}

Plugin:dania bronizmiany broni :


#define PLUGINNAME "Pistol Rounds"
#define VERSION "1.6"
#define AUTHOR "zp"

#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>

new pistolrounds

public plugin_init(){
register_plugin(PLUGINNAME, VERSION, AUTHOR);

pistolrounds = register_cvar("amx_pistolrounds", "0")

RegisterHam(Ham_Spawn, "player", "reset_weapons", 1);
}

public reset_weapons(id){
if(get_pcvar_num(pistolrounds)!=1){
return PLUGIN_HANDLED
}

if(is_user_alive(id)){

fm_strip_user_weapons(id);
cs_set_user_money(id, 800, 0);
fm_give_item(id, "weapon_knife");
cs_set_user_armor(id, 0, CS_ARMOR_NONE);

switch(get_user_team(id)){
case CS_TEAM_T:
{
fm_give_item(id, "weapon_knife");
cs_set_user_bpammo(id, CSW_GLOCK18, 40);
}
case CS_TEAM_CT:
{
fm_give_item(id, "weapon_knife");
cs_set_user_bpammo(id, CSW_USP, 24);
cs_set_user_defuse(id, 0);
}
}
}
return HAM_IGNORED;
}



@@Chodzi mi o to zzeby je polaczyc i wyrzucic z kodow co nie potrzebne z zrobic jeden plugin czyli runde rozgrzewka na deagle z respawnem
  • +
  • -
  • 0

#2 R3X

    Godlike

  • Przyjaciel

Reputacja: 2 987
Godlike

  • Postów:4 248
  • Lokalizacja:Nie
Offline

Napisano 05.06.2009 13:17

a może: http://amxx.pl/viewtopic.php?t=8970
  • +
  • -
  • 0

#3 Grycuk

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 17
Początkujący

  • Postów:113
  • GG:
  • Steam:steam
  • Imię:Kamil
  • Lokalizacja:Minsk Mazowiecki
Offline

Napisano 05.06.2009 13:33

raczej za bardzo skaplikowany mi zalezy aby byl respawn ,Deagle i res na koniec tylko tlye
  • +
  • -
  • 0

#4 R3X

    Godlike

  • Przyjaciel

Reputacja: 2 987
Godlike

  • Postów:4 248
  • Lokalizacja:Nie
Offline

Napisano 05.06.2009 13:40

to może ten http://amxx.pl/viewtopic.php?t=3724

Nie ma co robić nowego plugin, jak pełno jest gotowych :D
  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: Nowy Plugin

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych