Jeśli się da to chciał bym wiedzieć jak to się robi.
I szukam jeszcze pluginu na dokupowanie 10 sekund do budowy.
Użytkownik zenon edytował ten post 15.09.2011 17:02
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.
|
Napisano 15.09.2011 17:01
Użytkownik zenon edytował ten post 15.09.2011 17:02
Napisano 15.09.2011 17:03
Użytkownik Skull3D edytował ten post 15.09.2011 17:03
Napisano 15.09.2011 17:17
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <ammopacks.inc> // dolaczamy inc z natywem i forwardem
#include <fun>
#define PLUGIN "Item_nr2"
#define VERSION "1.0"
#define AUTHOR "G[o]Q"
new item
new koszt
new team
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
koszt=register_cvar("Nazwa_cvara_odpowiedzialnego_za_koszt","domyslna_wartosc")
team=register_cvar("Nazwa_cvara_odpowiedzialnego_za_team","domyslna_wartosc") //0 - ALL
//1 - ZOMBIE
//2 - HUMAN
new tkoszt=get_pcvar_num(koszt)
new tteam =get_pcvar_num(team)
item=dodaj_extra_item("+AP",tkoszt,tteam) //rejestrujemy nowy item - nazwa - koszt -team(1 - Zombie,2 - Human,0 - All
}
public wybrano_item(id,item_id){// co ma sie stac po kupieniu itemy
if(item_id==item){// sprawdzamy czy gracz kupil item zarejestrowany wczesniej
set_user_armor(id,500)
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n{\\ colortbl ;\\ red0\\ green0\\ blue0;}\n\\ viewkind4\\ uc1\\ pard\\ cf1\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
Użytkownik zenon edytował ten post 15.09.2011 17:20
Napisano 15.09.2011 17:45
#include <amxmodx> #include <amxmisc> #include <ammopacks.inc> #include <fun> #include <cstrike> #define PLUGIN "Un Ammo" #define VERSION "1.0" #define AUTHOR "Skull3D" new item; new koszt; new team; new ma[33]; new CSW_MAXAMMO[33]= {-2, 52, 0, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120, 30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, 0, 100, -1, -1} new cvar_enable public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) koszt=register_cvar("koszt_ne","500") team=register_cvar("team_ne","2") //0 - ALL //1 - ZOMBIE //2 - HUMAN new tkoszt=get_pcvar_num(koszt) new tteam =get_pcvar_num(team) item=dodaj_extra_item("Unlimited Ammo",tkoszt,tteam) //rejestrujemy nowy item - nazwa - koszt -team(1 - Zombie,2 - Human,0 - All register_event("CurWeapon", "event_curweapon", "be", "1=1") register_logevent("PoczatekRundy", 2, "1=Round_Start"); } public wybrano_item(id,item_id){// co ma sie stac po kupieniu itemy if(item_id==item){// sprawdzamy czy gracz kupil item zarejestrowany wczesniej ma[id] == true; } } public PoczatekRundy() { for(new id=0;id<=32;id++) { ma[id] = false; } } public event_curweapon(id) { //Check if the plugin is enabled and player is alive if(ma || !is_user_alive(id)) return PLUGIN_CONTINUE; //Get and check weapon ID new weaponID= read_data(2) if(weaponID==CSW_C4 || weaponID==CSW_KNIFE || weaponID==CSW_HEGRENADE || weaponID==CSW_SMOKEGRENADE || weaponID==CSW_FLASHBANG) return PLUGIN_CONTINUE; if(cs_get_user_bpammo(id, weaponID)!=CSW_MAXAMMO[weaponID]) cs_set_user_bpammo(id, weaponID, CSW_MAXAMMO[weaponID]) return PLUGIN_CONTINUE; }
Napisano 15.09.2011 18:00
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
ammo.sma(29) : warning 213: tag mismatch
ammo.sma(29) : warning 215: expression has no effect
ammo.sma(41) : error 033: array must be indexed (variable "ma")
ammo.sma(53) : warning 203: symbol is never used: "cvar_enable"
1 Error.
Could not locate output file ammo.amxx (compile failed).
Napisano 15.09.2011 18:08
#include <amxmodx> #include <amxmisc> #include <ammopacks.inc> #include <fun> #include <cstrike> #define PLUGIN "Un Ammo" #define VERSION "1.0" #define AUTHOR "Skull3D" new item; new koszt; new team; new ma[33]; new CSW_MAXAMMO[33]= {-2, 52, 0, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120, 30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, 0, 100, -1, -1} public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) koszt=register_cvar("koszt_ne","500") team=register_cvar("team_ne","2") //0 - ALL //1 - ZOMBIE //2 - HUMAN new tkoszt=get_pcvar_num(koszt) new tteam =get_pcvar_num(team) item=dodaj_extra_item("Unlimited Ammo",tkoszt,tteam) //rejestrujemy nowy item - nazwa - koszt -team(1 - Zombie,2 - Human,0 - All register_event("CurWeapon", "event_curweapon", "be", "1=1") register_logevent("PoczatekRundy", 2, "1=Round_Start"); } public wybrano_item(id,item_id){// co ma sie stac po kupieniu itemy if(item_id==item){// sprawdzamy czy gracz kupil item zarejestrowany wczesniej ma[id] = true; } } public PoczatekRundy() { for(new id=0;id<=32;id++) { ma[id] = false; } } public event_curweapon(id) { //Check if the plugin is enabled and player is alive if(ma || !is_user_alive(id)) return PLUGIN_CONTINUE; //Get and check weapon ID new weaponID= read_data(2) if(weaponID==CSW_C4 || weaponID==CSW_KNIFE || weaponID==CSW_HEGRENADE || weaponID==CSW_SMOKEGRENADE || weaponID==CSW_FLASHBANG) return PLUGIN_CONTINUE; if(cs_get_user_bpammo(id, weaponID)!=CSW_MAXAMMO[weaponID]) cs_set_user_bpammo(id, weaponID, CSW_MAXAMMO[weaponID]) return PLUGIN_CONTINUE; }
Napisano 15.09.2011 19:08
Napisano 15.09.2011 19:09
#include <amxmodx>
#include <amxmisc>
#include <ammopacks>
#include <fun>
#include <cstrike>
#define PLUGIN "Un Ammo"
#define VERSION "1.0"
#define AUTHOR "Skull3D"
new item,
koszt,
team;
new bool:gbItem[33];
new CSW_MAXAMMO[33]= {-2, 52, 0, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120, 30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, 0, 100, -1, -1}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
koszt=register_cvar("koszt_ne","500")
team=register_cvar("team_ne","2") //0 - ALL
//1 - ZOMBIE
//2 - HUMAN
new tkoszt=get_pcvar_num(koszt)
new tteam =get_pcvar_num(team)
item=dodaj_extra_item("Unlimited Ammo",tkoszt,tteam) //rejestrujemy nowy item - nazwa - koszt -team(1 - Zombie,2 - Human,0 - All
register_event("CurWeapon", "event_curweapon", "be", "1=1")
register_logevent("PoczatekRundy", 2, "1=Round_Start");
}
public wybrano_item(id,item_id)
{ // co ma sie stac po kupieniu itemy
if(item_id==item){// sprawdzamy czy gracz kupil item zarejestrowany wczesniej
gbItem[id] = true;
}
}
public PoczatekRundy()
{
new iPlayers[32], iNum;
get_players(iPlayers, iNum);
for(new i=0; i<=iNum; i++)
{
gbItem[iPlayers[i]] = false;
}
}
public event_curweapon(id)
{
//Check if the plugin is enabled and player is alive
if(gbItem[id] || !is_user_alive(id))
return PLUGIN_CONTINUE;
//Get and check weapon ID
new weaponID= read_data(2)
if(weaponID==CSW_C4 || weaponID==CSW_KNIFE || weaponID==CSW_HEGRENADE || weaponID==CSW_SMOKEGRENADE || weaponID==CSW_FLASHBANG)
return PLUGIN_CONTINUE;
if(cs_get_user_bpammo(id, weaponID)!= CSW_MAXAMMO[weaponID])
cs_set_user_bpammo(id, weaponID, CSW_MAXAMMO[weaponID])
return PLUGIN_CONTINUE;
}
Użytkownik Muzzi edytował ten post 15.09.2011 19:11
Napisano 15.09.2011 19:11
Napisano 15.09.2011 19:27
Napisano 15.09.2011 19:30
If you can dream it, you can do it.
Napisano 15.09.2011 20:23
Napisano 15.09.2011 20:31
#include <amxmodx>
#include <amxmisc>
#include <ammopacks>
#include <fun>
#include <cstrike>
#define PLUGIN "Un Ammo"
#define VERSION "1.0"
#define AUTHOR "Skull3D"
new item,
koszt,
team;
new bool:gbItem[33];
new CSW_MAXAMMO[33]= {-2, 52, 0, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120, 30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, 0, 100, -1, -1}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
koszt=register_cvar("koszt_ne","500")
team=register_cvar("team_ne","2") //0 - ALL
//1 - ZOMBIE
//2 - HUMAN
new tkoszt=get_pcvar_num(koszt)
new tteam =get_pcvar_num(team)
item=dodaj_extra_item("Unlimited Ammo",tkoszt,tteam) //rejestrujemy nowy item - nazwa - koszt -team(1 - Zombie,2 - Human,0 - All
register_event("CurWeapon", "event_curweapon", "be", "1=1")
register_logevent("PoczatekRundy", 2, "1=Round_Start");
}
public wybrano_item(id,item_id)
{ // co ma sie stac po kupieniu itemy
if(item_id==item){// sprawdzamy czy gracz kupil item zarejestrowany wczesniej
gbItem[id] = true;
}
}
public PoczatekRundy()
{
new iPlayers[32], iNum;
get_players(iPlayers, iNum);
for(new i=0; i<=iNum; i++)
{
gbItem[iPlayers[i]] = false;
}
}
public event_curweapon(id)
{
//Check if the plugin is enabled and player is alive
if(!gbItem[id] || !is_user_alive(id))
return PLUGIN_CONTINUE;
//Get and check weapon ID
new weaponID= read_data(2)
if(weaponID==CSW_C4 || weaponID==CSW_KNIFE || weaponID==CSW_HEGRENADE || weaponID==CSW_SMOKEGRENADE || weaponID==CSW_FLASHBANG)
return PLUGIN_CONTINUE;
if(cs_get_user_bpammo(id, weaponID)!= CSW_MAXAMMO[weaponID])
cs_set_user_bpammo(id, weaponID, CSW_MAXAMMO[weaponID])
return PLUGIN_CONTINUE;
}
Napisano 15.09.2011 20:50
Napisano 16.09.2011 14:30
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <ammopacks>
#include <fakemeta>
#define PLUGIN "Unlimited Ammo"
#define VERSION "1.0"
#define AUTHOR "Uzytkownik"
new item,
koszt,
team;
new bool:gbHasItem[33];
// CS Offsets
#if cellbits == 32
const OFFSET_CLIPAMMO = 51
#else
const OFFSET_CLIPAMMO = 65
#endif
const OFFSET_LINUX_WEAPONS = 4
// Max Clip for weapons
new const MAXCLIP[] =
{
-1, 13, -1, 10, 1, 7, -1, 30, 30, 1, 30,
20,25, 30, 35, 25, 12, 20,10, 30, 100,
8, 30,30, 20, 2, 7, 30, 30, -1, 50
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("koszt_unammo","100")
register_cvar("team_unammo","2")
koszt = get_cvar_num("koszt_unammo");
team = get_cvar_num("team_unammo");
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_message(get_user_msgid("CurWeapon"), "message_CurWeapon")
item = dodaj_extra_item("Nieskonczona Amunicja", koszt, team)
}
public client_connect(id)
gbHasItem[id] = false
public wybrano_item(id,item_id)
{
if(item_id==item)
{
new name[33];
get_user_name(id, name, charsmax(name));
client_print(id, 3, "%s kupil unlimited ammo", name);
gbHasItem[id] = true
}
}
public event_round_start()
{
new iPlayers[32], iNum;
get_players(iPlayers, iNum);
for (new i; i < iNum; i++)
{
if(!is_user_connected(iPlayers[i]))
continue;
gbHasItem[iPlayers[i]] = false;
}
}
public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
if (!gbHasItem[msg_entity])
return;
if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
return;
static weapon, clip
weapon = get_msg_arg_int(2)
clip = get_msg_arg_int(3)
if (MAXCLIP[weapon] > 2)
{
set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])
if (clip < 2)
{
static wname[32], weapon_ent
get_weaponname(weapon, wname, sizeof wname - 1)
weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
}
}
}
stock fm_find_ent_by_owner(entity, const classname[], owner)
{
while ((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) {}
return entity;
}
stock fm_set_weapon_ammo(entity, amount)
set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_LINUX_WEAPONS);
Napisano 16.09.2011 16:39
cFun.pl BaseBuilderPro v6.5.8 Tirant edit by diggs
IP: 80.82.16.66:27034
cFun.pl Only AWP - 1000 FPS [SkinsMod]
IP: 80.72.42.113:27015
Napisano 18.09.2011 12:18
Użytkownik rpk. shark edytował ten post 18.09.2011 12:29
Spoiler...
Napisano 18.09.2011 13:31
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <ammopacks>
#include <fakemeta>
#define PLUGIN "Unlimited Ammo"
#define VERSION "1.0"
#define AUTHOR "Uzytkownik"
new item,
koszt,
team;
new bool:gbHasItem[33];
// CS Offsets
#if cellbits == 32
const OFFSET_CLIPAMMO = 51
#else
const OFFSET_CLIPAMMO = 65
#endif
const OFFSET_LINUX_WEAPONS = 4
// Max Clip for weapons
new const MAXCLIP[] =
{
-1, 13, -1, 10, 1, 7, -1, 30, 30, 1, 30,
20,25, 30, 35, 25, 12, 20,10, 30, 100,
8, 30,30, 20, 2, 7, 30, 30, -1, 50
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("koszt_unammo","100")
register_cvar("team_unammo","2")
koszt = get_cvar_num("koszt_unammo");
team = get_cvar_num("team_unammo");
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_message(get_user_msgid("CurWeapon"), "message_CurWeapon")
item = dodaj_extra_item("Nieskonczona Amunicja", koszt, team)
}
public client_connect(id)
gbHasItem[id] = false
public wybrano_item(id,item_id)
{
if(item_id==item)
{
new name[33];
get_user_name(id, name, charsmax(name));
client_print(id, 3, "%s kupil unlimited ammo", name);
gbHasItem[id] = true
}
}
public event_round_start()
{
new iPlayers[32], iNum;
get_players(iPlayers, iNum);
for (new i; i < iNum; i++)
{
if(!is_user_connected(iPlayers[i]))
continue;
gbHasItem[iPlayers[i]] = false;
}
}
public message_CurWeapon(msg_id, msg_dest, msg_entity)
{
if (!gbHasItem[msg_entity])
return;
if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
return;
static weapon, clip
weapon = get_msg_arg_int(2)
clip = get_msg_arg_int(3)
if (MAXCLIP[weapon] > 2)
{
set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])
if (clip < 2)
{
static wname[32], weapon_ent
get_weaponname(weapon, wname, sizeof wname - 1)
weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
}
}
}
stock fm_find_ent_by_owner(entity, const classname[], owner)
{
while ((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) {}
return entity;
}
stock fm_set_weapon_ammo(entity, amount)
set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_LINUX_WEAPONS);
Napisano 18.09.2011 15:48
0 użytkowników, 0 gości, 0 anonimowych