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

Prośba spolszczenia


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

#1 Slugger

    Wszechobecny

  • Użytkownik

Reputacja: 19
Początkujący

  • Postów:406
  • GG:
  • Lokalizacja:Piła
Offline

Napisano 02.06.2009 13:48

Witam...
Czy ktoś mógł by mi spolszczyć plugin?

Ponieważ sam nie wiem co mogę spolszczyć, a co nie...

/* Plugin generated by AMXX-Studio */
/*********************************************************************************

Superweapon -- M4 with M203 Edition

This plugin supply a sort of special weapon: M4A1 with M203 grenade launcher.

The M203 can launch 2 type of grenades: He-grenade & Gas-grenade.

He-grenade can hurt players spang with blast damage & Gas-grenade hurt player who touch the "gas".



----------------------------------------------------------------------------------
Modul & Require:

<amxmisc>
<cstrike>
<fakemeta>



----------------------------------------------------------------------------------
CAVR:


SW_SpawnMode 0|1|2	//define superweapon spawn mode, 
//"0" means superweapon never spawn, (admin still can give it to any player by admin command)
//"1" means auto, superweapon will auto spawn in general maps(DE|CS|AS|ES)
//"2" means superweapon will auto spawn in all type of maps
		

SW_MaxAmount_TE 3	//max amount of terrorists can holded m4 with m203


SW_MaxAmount_CT 3	//max amount of cts can holded m4 with m203

	
SW_GrenadeTK 0		//40mm hegrenade team kill,"0" is secundum server's rule, "1" is TK in any case


SW_GrenadeRT 3.0	//grenade reload time


SW_HeGrenadeMD 100	//40mm he grenade max damage


SW_HeGrenadeDR 400	//40mm he grenade damage radius


SW_HeGrenadeMC 3	//40mm he grenade's max amount can been carried


SW_HeGrenadePR 500	//40mm he grenade's price


SW_GasGrenadeMD 100	//40mm gas grenade max damage


SW_GasGrenadeDR 100	//40mm gas grenade damage radius


SW_GasGrenadeMC 1	//40mm gas grenade's max amount can been carried


SW_GasGrenadePR 500	//40mm gas grenade's price




----------------------------------------------------------------------------------
About the superweapon spawn:

Generally(can change by CVAR or Admin), superweapons will spawn after 1th round, stochastic 

locality in map, with specifically amount(by CVAR setting).




----------------------------------------------------------------------------------
Command:

1.Admin command(ADMIN_IMMUNITY): give or strip player's superweapon

amx_sw_m4 <#id | name> <give | strip>

{<#playerindex|name(can be partial)> <g(means give M4A1/W M203)|s(means strip target's superweapon if he has>}")


2.Admin command(ADMIN_IMMUNITY): change superweapon mode

amx_sw_set <0 | 1 | 2>


"0" means stop SW mode(also strip all sw)

"1" means start it by CVAR(SW_SpawnMode)'s setting

"2" means start anywise


3.Player command: open superweapon menu

When player's Current weapon is "superweapon", press "spray key" will openning menu of grenade setting,

menu include:

1.Switch current grenade type to he-grenade
2.Switch current grenade type to gas-grenade
3.Setting|Offload muffler
4.Buy he-grenade
5.Buy gas-grenade


4.Fire 40mm grenade:

press "+attack2" key to launch grenade 




----------------------------------------------------------------------------------
Credit:

code and more:	VEN & more

model maker:	Ankalar, CJ, TinSoldier, S7ok3, Dirtball, Pr0d!gy, Ritual, Rob O, Jennifer!!,
		SureShot, Nightshade, Sas.stu, -X-, Vunsata



*********************************************************************************/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>

#define PLUGIN "Ryu_SuperWeapon"
#define VERSION "0.3"
#define AUTHOR "CZ*Ryu"

#define MAXPLAYERS 32
#define MAXNUM 64	

#define SW_BOX_PARAM_NOTOUCH 0
#define SW_BOX_PARAM_TRIGGER 1

#define SW_BOX_SILEN_OFF 0
#define SW_BOX_SILEN_ON 1

//grenade tyep, ItemPickup & Scenario: grenade type(he|gasun-use) sprite string num constant, 
#define TYPE_HENADE 0
#define TYPE_GASNADE 1
#define TYPE_INCENDIARY 2
#define NOT_SHOW_NUM 10

//team kill check constant
#define HURT_ENEMY 0
#define HURT_TEAMMATE 1
#define HURT_SELF 2
#define HURT_NONE 3

//effect entity
#define EFFECT_EXPLO 0
#define EFFECT_BLOOD 1

#pragma dynamic 32768


//common value
new iRoundCount
new iServerTK		//expression of server's team-kill rule

new bool:bIsCsSeries = false
new bool:bHasNewWeapon = true
new bool:bRightMapType = false
new bool:bSpawnSwBox

//team
new const TE = 1
new const CT = 2
new const SPECTATOR = 3

//icon state constant
new const CLEAR = 0
new const SHOW = 1

//take count of superweapon
new const COUNT = 1

//task id
new const iTaskSpanwSwBox = 33333
new const iTaskBuyTimeOver = 33334

//message id
new iDeathMsgID
new iItemPickupMsgID
new iSayTextMsgID
new iScenarioMsgID
new iStatusIconMsgID

new const sNadeStateString[2][] = {"dmg_rad", "item_healthkit"}//,"dmg_heat"}

//------ pcvar -------------------------------
new cvar_SwSpawnMode_num
new cvar_SwMaxHolders_TE_num
new cvar_SwMaxHolders_CT_num
new cvar_SwNadeReloadTime_flo
new cvar_SwNadeTeamKill_num
//40mm hegrenade
new cvar_SwNadeMaxDmg_HE_num
new cvar_SwNadeDmgRadius_HE_num
new cvar_SwNadeMaxCarried_HE_num
new cvar_SwNadePrice_HE_num
//40mm gas grenade
new cvar_SwNadeMaxDmg_GAS_num
new cvar_SwNadeDmgRadius_GAS_num
new cvar_SwNadeMaxCarried_GAS_num
new cvar_SwNadePrice_GAS_num


new iSwSpawnMode
new bool:bSwNadeTK
new Float:fSwNadeReloadTime	//grenade reload time
new iSwNadePrice[2]		//[0] is hegrenade's price, [1] store gas grenade's
new iSwNadeMaxCarried[2]		//how many grenades can been tote, [0] is hegrenade, [1] store gas grenade
new Float:fSwNadeMaxDmg_HE	//hegrenade max damage
new sSwNadeMaxDmg_GAS[4]		//gas grenade max damage
new Float:fSwNadeDmgRadius[2]	//grenade damage radius


//---------------------------------------------

//correlative variable of superweapon spawn
new iInfoEntAmount			//count of player spawn points
new Float:fInfoEntOrigin[MAXNUM][3]	//origin of player spawn points
new iGhostEntID[MAXNUM]			//assistant entity(for get superweapon spawn point) id
new bool:bGhostEntRemoved = false
new const sGhostEntClassname[] = "Sw_AssistEntity"


new const sSwClassname_Prefix[] = "Sw_"

new const	sSwM4BoxClassname[] = "Sw_Box_M4withM203"
new const	sSwM4BoxSpriteClassname[] = "Sw_Sprite"
new		sSwM4BoxSprite[] = "sprites/3dmflaora.spr"
new		iSwM4MaxAmount			//max sueprweapon amount
new		iSwM4MaxTeamHolders[4]		//max sueprweapon amount of each team(te|ct) can hold
new 		iSwM4CurTeamHolders[4]	//current amount of each team hold
new const	iSwM4WeaponID = CSW_M4A1
new		sSwM4WeaponName[] = "weapon_m4a1"
new const	sSwM4Model_v[] = "models/v_m4a1_sw.mdl"
new const	sSwM4Model_p[] = "models/p_m4a1_sw.mdl"
new const	sSwM4Model_w[] = "models/w_m4a1_sw.mdl"


//some player personal parameter
new iUserHoldSwM4[MAXPLAYERS+1] = 0	//player(id) has superweapon?
new iUserNadeCurType[MAXPLAYERS+1]	//player current animated type of grenade
new iUserNadeAmount[MAXPLAYERS+1][3]	//player's 40mm grenade amount, [0] is "he", [1] is "gas"
new iUserTouchTimes[MAXPLAYERS+1]
new iUserHasHurtEnt[MAXPLAYERS+1]
new iSwM4SilenStatus[MAXPLAYERS+1]
new iSwM4ClipAmmo[MAXPLAYERS+1]
new iSwM4BpAmmo[MAXPLAYERS+1]
new bool:bRestartAttempt[MAXPLAYERS+1]


new bool:bInBuyzone[MAXPLAYERS+1] = true
new bool:bNadeReloaded[MAXPLAYERS+1] = true
new bool:bInBuyTime
new bool:bInFreezeTime


//grenade's value
//menu
new iSwNadeMenuID
new sSwNadeMenuBody[512]
new sSwNadeMenuTitle[] = "M4withM203"
new iMenuKeys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_0

new iSwNadeSprite_Trail
new iSwNadeSprite_GasExplode
new iSwNadeSprite_GasFog

new const sSwNadeClassname[2][] = {"Sw_Grenade_HE","Sw_Grenade_GAS"}	//40mm grenade(type he & gas) of m203
new const sSwNadeFakeGasClassname[] = "Sw_FakeGas"
new const sSwNadeFakeHurtClassname[] = "Sw_HurtEnt"
new const sSwNadeSprite_Trail[] = "sprites/smoke.spr"
new const sSwNadeSprite_GasExplode[] = "sprites/WXplo1.spr"
new const sSwNadeSprite_GasFog[] = "sprites/fakefog.spr"
new const sSwNadeModel_w[] = "models/grenade.mdl"
new sSwNadeSound_Launch[] = "launch40mm.wav"
new sSwNadeSound_Buy[] = "items/gunpickup2.wav"
new sSwNadeSound_Change[] = "items/gunpickup1.wav"
new sSwNadeSound_GasExplode[] = "weapons/sg_explode.wav"
new sSwNadeSound_UseUp[] = "weapons/dryfire_rifle.wav"

new sMsgCannotGetSw[] = "^x03 It is max amount of^x03 your team^x04 can took superweapons now, cannot take more."
new sMsgStripSw[] = "^x03 Sorry! System strip you superweapon by max team-holders's limit."

//some common constant
new const sClassname[] = "classname"
new const sWeaponbox[] = "weaponbox"
new const sPlayer[] = "player"
new const sFuncBreakable[] = "func_breakable"
new const sFuncPushable[] = "func_pushable"
new const sHostageEntity[] = "hostage_entity"
new const sMonsterScientist[] = "monster_scientist"

new const sInfoPlayerStart[] = "info_player_start"
new const sInfoPlayerDeathmatch[] = "info_player_deathmatch"

new const sNamedEntEnvSprite[] = "env_sprite"
new const sNamedEntEnvExplosion[] = "env_explosion"
new const sNamedEntEnvBlood[] = "env_blood"
new const sNamedEntInfoTarget[] = "info_target"
new const sNamedEntTriggerHurt[] = "trigger_hurt"

new const sModel_Weaponbox_w[] = "models/w_weaponbox.mdl"
new const sModel_M4_w[] = "models/w_m4a1.mdl"
new const sModel_Prefix_w[] = "models/w_"

new iSwEffectID[2]
new const sSwEffectClassname[] = "Sw_EffectEnt"

//stock const
stock const pev_SwBox_Param_e = pev_euser1
stock const pev_SwBox_Silen_e = pev_euser2
stock const pev_SwBox_ClipAmmo_e = pev_euser3
stock const pev_SwBox_BpAmmo_e = pev_euser4
stock const pev_SwBox_HeAmount_i = pev_iuser1
stock const pev_SwBox_GasAmount_i = pev_iuser2
stock const pev_SwNade_HurtEnt_i = pev_iuser1
stock const pev_SwNade_ExploPoint_v = pev_vuser1


new const iPrimaryWeaponTable[] = {
	CSW_AK47,
	CSW_M4A1,
	CSW_AWP,
	CSW_MP5NAVY,
	CSW_SG552,
	CSW_AUG,
	CSW_SCOUT,
	CSW_UMP45,
	CSW_P90,
	CSW_M249,
	CSW_M3,
	CSW_XM1014,
	CSW_TMP,
	CSW_MAC10,
	CSW_G3SG1,
	CSW_SG550,
	CSW_GALIL,
	CSW_FAMAS,
	2		//shield
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	iDeathMsgID = get_user_msgid("DeathMsg")
	iItemPickupMsgID = get_user_msgid("ItemPickup")
	iSayTextMsgID = get_user_msgid("SayText")
	iScenarioMsgID = get_user_msgid("Scenario")
	iStatusIconMsgID = get_user_msgid("StatusIcon")
	
	register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
	register_event("ResetHUD", "event_client_spawn", "be")
	register_event("CurWeapon", "event_check_superweapon", "be", "1>0", "2=22")
	register_event("TextMsg", "event_reset_round", "a", "2&#Game_C", "2&#Game_w")
	register_event("StatusIcon", "event_check_in_buyzone", "be", "2=buyzone")
	register_event("DeathMsg", "event_DeathMsg", "a")//, "4=65536")//DMG_NERVEGAS
	
	register_logevent("logevent_round_start", 2, "0=World triggered", "1=Round_Start")
	
	register_forward(FM_Touch, "forward_touch")
	register_forward(FM_SetModel, "forward_reset_model")
	register_forward(FM_CmdStart, "forward_CmdStart")
	register_forward(FM_Think, "forward_SW_think")
	
	iSwNadeMenuID = register_menuid(sSwNadeMenuTitle)
	register_menucmd(iSwNadeMenuID, 1023, "menu_SwGrenade_option")
	
	register_clcmd("fullupdate", "hook_clcmd_fullupdate")
	register_concmd("amx_sw_m4", "hook_concmd_sw_m4",ADMIN_IMMUNITY, "{<#playerindex|name(can be partial)> <g(means give M4A1/W M203)|s(means strip target's superweapon if he has>}")
	register_concmd("amx_sw_set", "hook_concmd_sw_set",ADMIN_IMMUNITY, "{<0>|<1>|<2>, ^"0^" stop SW mode(also strip all sw) & ^"1^" start it by SW_SpawnMode's setting & ^"2^" start anywise}")
		
	cvar_SwSpawnMode_num = register_cvar("SW_SpawnMode", "1")//define superweapon appear mode, 
	//"0" means superweapon never spawn, (admin still can give it to any player by admin command)
	//"1" means auto, superweapon will auto spawn in general maps
	//"2" means superweapon will auto spawn in all type of maps
		
	cvar_SwMaxHolders_TE_num = register_cvar("SW_MaxAmount_TE", "3")//max amount of terrorists can holded m4 with m203
	cvar_SwMaxHolders_CT_num = register_cvar("SW_MaxAmount_CT", "3")//max amount of cts can holded m4 with m203
	
	cvar_SwNadeTeamKill_num = register_cvar("SW_GrenadeTK", "0")//grenade team kill,"0" is secundum server's rule, "1" is TK in any case
	cvar_SwNadeReloadTime_flo = register_cvar("SW_GrenadeRT", "3.0")//grenade reload time
	
	cvar_SwNadeMaxDmg_HE_num = register_cvar("SW_HeGrenadeMD", "100")		//40mm he grenade max damage
	cvar_SwNadeDmgRadius_HE_num = register_cvar("SW_HeGrenadeDR", "400")	//40mm he grenade damage radius
	cvar_SwNadeMaxCarried_HE_num = register_cvar("SW_HeGrenadeMC", "2")		//40mm he grenade's max amount can been took
	cvar_SwNadePrice_HE_num = register_cvar("SW_HeGrenadePR", "500")		//40mm he grenade's price
	
	cvar_SwNadeMaxDmg_GAS_num = register_cvar("SW_GasGrenadeMD", "100")	//40mm gas grenade max damage
	cvar_SwNadeDmgRadius_GAS_num = register_cvar("SW_GasGrenadeDR", "100")	//40mm gas grenade damage radius
	cvar_SwNadeMaxCarried_GAS_num = register_cvar("SW_GasGrenadeMC", "1")	//40mm gas grenade's max amount can been took
	cvar_SwNadePrice_GAS_num = register_cvar("SW_GasGrenadePR", "500")	//40mm gas grenade's price
	
	iInfoEntAmount = get_InfoEnt_origin()
	
	new len = format(sSwNadeMenuBody, 511, "w[ E-M4 opcje broni ]^n^n")
	len += format(sSwNadeMenuBody[len], 511 - len, "y1.Przelacz granatnik na typ HE^n")
	len += format(sSwNadeMenuBody[len], 511 - len, "y2.Przelacz granatnik na typ GAS^n")
	len += format(sSwNadeMenuBody[len], 511 - len, "y3.Opcja | Zrzuc tlumik^n")
	len += format(sSwNadeMenuBody[len], 511 - len, "w4.Zakup granaty HE^n")
	len += format(sSwNadeMenuBody[len], 511 - len, "w5.Zakup granaty GAS^n^n")
	format(sSwNadeMenuBody[len], 511 - len, "r0.Wyjdz")
	
	iSwSpawnMode = get_pcvar_num(cvar_SwSpawnMode_num)
	switch ( iSwSpawnMode )
	{
		case 0:
		{
			bSpawnSwBox = false
			bRightMapType = false
		}
		case 1:
		{
			bRightMapType = ( engfunc(EngFunc_FindEntityByString, -1, sClassname, sHostageEntity)
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, sMonsterScientist)
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, "func_hostage_rescue")
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, "info_hostage_rescue")
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, "func_bomb_target")
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, "info_bomb_target")
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, "func_vip_start")
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, "info_vip_start")
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, "func_vip_safetyzone")
			|| engfunc(EngFunc_FindEntityByString, -1, sClassname, "func_escapezone") )?true:false
			bSpawnSwBox = bRightMapType
		}
		case 2:
		{
			bSpawnSwBox = true
			bRightMapType = true
		}
	}
	
	iServerTK = HURT_TEAMMATE
	if ( cvar_exists("mp_friendlyfire") )
		iServerTK = ( get_cvar_num("mp_friendlyfire") )?HURT_TEAMMATE:HURT_NONE
}

public plugin_precache()
{
	new sModName[32]
	get_modname(sModName,31)
	if ( equal(sModName,"cstrike") || equal(sModName,"czero") )
		bIsCsSeries = true
	else if ( equal(sModName,"csv15") || equal(sModName,"cs13") )
	{
		bIsCsSeries = true
		bHasNewWeapon = false
	}
	if ( !bIsCsSeries )
		pause("ae")
	
	precache_model(sSwM4Model_v)
	precache_model(sSwM4Model_p)
	precache_model(sSwM4Model_w)

	precache_model(sSwNadeModel_w)
		
	precache_sound(sSwNadeSound_Launch)
	precache_sound(sSwNadeSound_Buy)	//buy grenades
	precache_sound(sSwNadeSound_Change)	//grenades type change
	precache_sound(sSwNadeSound_GasExplode)
	precache_sound(sSwNadeSound_UseUp)
	
	precache_model(sSwM4BoxSprite)
	iSwNadeSprite_Trail = precache_model(sSwNadeSprite_Trail)
	iSwNadeSprite_GasExplode = precache_model(sSwNadeSprite_GasExplode)
	iSwNadeSprite_GasFog = precache_model(sSwNadeSprite_GasFog)
	
	return PLUGIN_CONTINUE
}

public event_new_round()
{
	iRoundCount++
	new iSpawnAmount = get_cvar_param()
	new iMaxEntities = global_get(glb_maxEntities)
	new i,sClass[32]
	for ( i=MAXPLAYERS+1; i<iMaxEntities; i++ )
	{
		if ( !pev_valid(i) )
			continue
		pev(i, pev_classname, sClass, sizeof sClass - 1 )
		if ( equal(sClass, sSwClassname_Prefix, 3) )
			engfunc(EngFunc_RemoveEntity, i)
	}
	create_effect_entity()
	if ( !bGhostEntRemoved )
		bGhostEntRemoved = remove_GhostEnt()
	if ( bSpawnSwBox && iRoundCount > 1 && iSpawnAmount > 0 )
		bGhostEntRemoved = bool:spawn_GhostEnt(iSpawnAmount)
	return PLUGIN_CONTINUE
}			

public hook_clcmd_fullupdate(id)
{
	return PLUGIN_HANDLED
}

public event_client_spawn(id)
{
	new iMenuID,iKeys
	get_user_menu(id, iMenuID, iKeys)
	if ( iMenuID == iSwNadeMenuID )
		client_cmd(id, "slot10")
	
	if ( bRestartAttempt[id] )
	{
		bRestartAttempt[id] = false
		return
	}
	
	iUserHasHurtEnt[id] = 0
	bNadeReloaded[id] = true
	if ( iUserHoldSwM4[id] > MAXPLAYERS && pev(id, pev_weapons) & (1<<iSwM4WeaponID) )
	{
		

  • +
  • -
  • 0

#2 R3X

    Godlike

  • Przyjaciel

Reputacja: 2 987
Godlike

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

Napisano 02.06.2009 13:57

Kod urywa się, więc nie wiem co jest dalej ;P spolszczyć należy wszystko to co widzi gracz: client_print`y, treść menu i show_hudmessage.
  • +
  • -
  • 0

#3 Slugger

    Wszechobecny

  • Autor tematu
  • Użytkownik

Reputacja: 19
Początkujący

  • Postów:406
  • GG:
  • Lokalizacja:Piła
Offline

Napisano 02.06.2009 14:10

Kod urywa się

Dziwne, ponieważ ten plugin mam z tego forum.

No cóż, dzięki za pomoc.
  • +
  • -
  • 0

#4 R3X

    Godlike

  • Przyjaciel

Reputacja: 2 987
Godlike

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

Napisano 02.06.2009 14:18

No masz tylko może jest za długi by zmieścić się w quote? daj w załączniku
  • +
  • -
  • 0

#5 naven

    Hero

  • Power User

Reputacja: 204
Profesjonalista

  • Postów:1 088
  • GG:
  • Imię:Adam
  • Lokalizacja:Cieszyn
Offline

Napisano 02.06.2009 17:57

Ściągnij sobie amxx studio, większość tekstu na czerwono możesz tłumaczyć(kompiluj co chwile to będziesz widział czy błędy są)
  • +
  • -
  • 0




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

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