[AMX] Tổng hợp Code, Plug do Mem chế hoặc giới thiệu

  • Thread starter Thread starter Orpheus
  • Ngày gửi Ngày gửi
Mềnh compile có bị lỗi gì đâu:|

Bạn làm ơn share cho mình thư mục scripting đầy đủ chứa các file .sma đó được không? Cũng nhẹ mà share lên mf nha. Thank!
 
Bác nào hảo tâm share dùng em các code .sma mà anh Tùng đã share không bị lỗi lúc compiled được không?
Em download trong box về không hiểu sao cứ compiled là lỗi.
Cám ơn!
Có thể bạn chưa đặt đủ các file inc, bạn phải copy toàn bộ 2 folder modules và scripting vào, nếu k thì k thể complied đc. Nếu copy đủ mà còn k đc thì chi còn cách cài lại amx :))
 
Có bản plugin nào làm chế độ deathmatch như CF ko, tức là hồi sinh sau 15s ấy, hôm nọ em mò trong box skin súng thấy có clip có chế độ này, vs cả plugin nhìu nhìu loại súng để bắn vs bot nữa, mấy khẩu có sẵn cũng nhàm rồi, bot nha, không phải zombie đâu. em dùng bản cs1.6v7 full, mong các anh tìm giúp, cám ơn nhìu. À tiện cho e hỏi plugin thì dùng sao, như e biết là chép đè vào file cstrike vậy có sợ mất mấy skin có sẵn k. Em gà đừng mắng:D
 
Có bản plugin nào làm chế độ deathmatch như CF ko, tức là hồi sinh sau 15s ấy, hôm nọ em mò trong box skin súng thấy có clip có chế độ này, vs cả plugin nhìu nhìu loại súng để bắn vs bot nữa, mấy khẩu có sẵn cũng nhàm rồi, bot nha, không phải zombie đâu. em dùng bản cs1.6v7 full, mong các anh tìm giúp, cám ơn nhìu. À tiện cho e hỏi plugin thì dùng sao, như e biết là chép đè vào file cstrike vậy có sợ mất mấy skin có sẵn k. Em gà đừng mắng:D
Plugin deathmatch thì dùng csdm ấy, còn plugin thêm súng thì có 2 loại cho bạn lựa chọn : NST_WPN và G4U_WPN (NST_WPN k có topic riêng, nếu cần thì mình share cho (mình thì mình thích NST_WPN hơn :)))
Việc thêm plugin thì bạn phải cài amx mod x (xin quote lại toàn bộ tut của 5cor)
[SPOIL]
Sau đây là hướng dẫn cài AMX MOD X của anh 5c0r-|3i0 :X :X.Có cả hình ảnh :D :D để noob hoặc newbie cài đặt dễ hơn =]].


-Vào trang nì để down Amx Mod X về :D
http://www.amxmodx.org/downloads.php
1.jpg

-Tìm phần core packages - Amx mod x full installer
2.jpg


-Click dzô xong nó dẫn đến đường chọn mirror download.Chọn bất cứ cái nào
3.jpg


-Chờ nó download xong rồi open ra.Sẽ hiện một bảng cài đặt
4.jpg


-Next > I accept the terms of agreement > Next
5.jpg


-Chọn đường dẫn để cài vào máy
**Lưu ý**
Cái này là bản cài đặt phần code của Amx mod x.Không cần phải để ở thư mục cstrike.Cài Amx Mod X cho server sẽ đc hướng dẫn ở phần tiếp.
-Next > Next nó sẽ cài đặt vào đường dẫn đã chọn
7.jpg

-Click vào Finish và không bỏ dấu chéo để tiếp tục cài đặt amx mod x vào server
8.jpg

-Finish đc 1/2 rồi.Giờ là cài AMX MOD X cho server
-Sau khi click Finish sẽ hiện ra thêm 1 bảng cài thứ 2 > Đây là bản cài AMX MOD X vào server của bạn.
9.jpg

-Next > I accept.... > Next
10.jpg


***Phần quan trọng nhứt***

-Phải chọn phần SELECT MOD DIRECTORY
11.jpg

-Next > Hiện ra 1 bảng đòi đường dẫn.Chọn vào đường dẫn cài CS của bạn.Đường dẫn tới thư mục cstrike.
Vd:Đường dẫn của mình là C:/CS/CS/cstrike
12.jpg

14.jpg

-Lưu ý phần Custom game addons.Chọn Counter-Strike
13.jpg

-Ok > Next > Xong bắt đầu cài
15.jpg


*****Một số lỗi khi đang cài đặt*****

1)liblist.gam not found . Do you want to continue ??.
>> Nghĩa là bạn đã chọn sai đường dẫn.

2)Another version of Amx mod x has been installed....ko nhớ rõ :-ss.
>> Đã cài amx mod x vào,Chọn NO để nâng cấp modules + plugins của amx mod x.Chọn YES để cài lại mới hoàn toàn.Cancel >> Tự biết =]]

Có một số lỗi khác Bio đang tìm kiếm...Chỉ mới biết đc 2 lỗi thường gặp nài :D

-Thế là cài xong AMX MOD X cho Server của bạn.Xin chúc mừng ^^,Click Finish
16.jpg


***Về cài đặt plugins***
Sẽ post sau,Học bài rồi :GT st::GT st:
[/SPOIL]
Và đây là cách cài đặt plugin
[SPOIL]

-Sau khi cài đặt AMX MOD X vào server.Bạn đc một số Quyền sau =]]
1)Server vui + màu mè hơn với nhìu plugins(Plugins |3i0 giới thiệu sau :D)
2)Dễ ban,kick. Một số server ở VN mình Non-Steam nên ko bao giờ Ban đc :D
3)Cài đặt một số Mod vui,hay ^^(Giới thiệu sau ^^)
4)Góp 50% vào việc quản lí server.(Tự động đổi map khi server bị crash...Lí do crash ko bek)

-Sau khi cài Plugins vào server.bạn cũng đc nhận vài món quà như =]]

1)Tốn một "tẹo" CPU.Ko sao đâu đừng lo ^^
2)RAM ko bị ảnh hưởng đâu ^^
3)Một vài Mod lạm dụng phá server ^^(|3i0 chả hạn =]])

***** Rồi rồi hướng dẫn đêy ^^ *****
1)Vào thư mục cstrike ,sau khi cài AMX MOD X sẽ có thêm 1 thư mục là addons
17.jpg


2)Vào thư mục addons vào thư mục amxmodx
18.jpg


3)Vào thư mục configs
19.jpg


4)Mở file plugins.ini = Notepad hoặc Wordpad ( 2 cái như nhau :|)

5)Xong sẽ hiện ra một list plugins :X
22.jpg


Đây là plugins.ini của |3i0 (đã tắt vài cái mặc định cho bớt CPU,Khuyên mọi ngừi cùng hưởng ứng =]])

6)Kéo xuống phía dưới.Có 1 dòng Add 3rd party plugins here....
23.jpg


**Nếu thêm Plugins nào thì chỉ việc ghi tên của plugins đó trong thư mục cstrike/amxmodx/plugins(ghi đầy đủ VD:conEcga.amxx) ^^
**Nếu Plugins đó bị lỗi mà hiện thông báo trong Console server thì ghi thêm debug phía sau
(VD:conEcga.amxx debug)

***WARNING***
Có một số plugins cần phải enable modules.
Tên một số module:
-cstrike (Server cstrike cần cái nì ^^)
-hamsandwich ( nghe thèm òi ^^)
-fakemeta (Tạo một số hiệu ứng hay)
-fun (Theo đúng nghĩa của nó ^^)
-csx (Nếu mún làm top15 rank thì phải có )
-nvault ( lưu trữ dữ liệu về rank và plugins)
-mysql ( Khi có một số Mod như SuperHero hoặc War3FT,Mún lưu EXP có thế sử dụng cái nì)
-engine
-geoip (Xác định IP của Client và Server = plugins)
-ArrayX ( Có cái plugins nào cần cái này >"<,Bio sẽ nói rõ hơn trong post sau)
-FakeFull (Đang ngâm cứu =]])
-CSHack

Ngoài ra còn một số modules khác Bio đang tìm

****Để thêm Modules****
-Vào thư mục cstrike/amxmodx/configs
-Tìm modules.ini mở file = Notepad hoặc Wordpad
24.jpg

-Ghi tên module vào.
25.jpg

-Save lại ( Đừng bao giờ quên =]])
[/SPOIL]
P/s: Box luôn hoan nghênh noob, chả ai mắng bạn đâu :))
 
Chỉnh sửa cuối:
Có thể bạn chưa đặt đủ các file inc, bạn phải copy toàn bộ 2 folder modules và scripting vào, nếu k thì k thể complied đc. Nếu copy đủ mà còn k đc thì chi còn cách cài lại amx :))

Đã giúp thì giúp cho chót bạn up dùm 2 folder modules và scripting của bạn cho mình với!
Như vậy là chuẩn và chắc là không bị lỗi nhất.
Giúp mình đi bạn!
 
Ko compile dc là do thiếu inc vào CSO NST F5 chép mấy file nst_player, nst_zombie, nst_scenario, nst_.... trong amxmodx/scripting/include
 
Bác nào hảo tâm share dùng em các code .sma mà anh Tùng đã share không bị lỗi lúc compiled được không?
Em download trong box về không hiểu sao cứ compiled là lỗi.
Cám ơn!

Không có inc hả??? Chắc là thế.. :D phải có nst_zombie.inc, nst_player.nic, nst_wpn.inc... mới complie được đống đó

P/S: Tiện thế các bác cho em hỏi
register_forward là đăng kí gì thế (fm_PrePlayerThink là gì ạ?)

---------- Post added at 20:32 ---------- Previous post was at 20:30 ----------

@ANH TÙNG: Bác chỉ dùm em hàm Ghi INI trong AMXX với... Ghi dòng thì dễ bị lỗi lắm..Ai nghịck nghịck ENTER cho phát thì cả Launcher và Plugins coi như die...
 
Không có inc hả??? Chắc là thế.. :D phải có nst_zombie.inc, nst_player.nic, nst_wpn.inc... mới complie được đống đó

P/S: Tiện thế các bác cho em hỏi
register_forward là đăng kí gì thế (fm_PrePlayerThink là gì ạ?)

---------- Post added at 20:32 ---------- Previous post was at 20:30 ----------

@ANH TÙNG: Bác chỉ dùm em hàm Ghi INI trong AMXX với... Ghi dòng thì dễ bị lỗi lắm..Ai nghịck nghịck ENTER cho phát thì cả Launcher và Plugins coi như die...
register_forward là đăng ký forward chứ còn cái j` nữa (tức là cái dùng trong public ấy :)))
Chỉ có fm_PlayerPreThink thôi
[SPOIL]
Mã:
enum {
	FM_PrecacheModel = 1,		// int )	(const szModel[])
	FM_PrecacheSound,		// int )	(const szSound[])
	FM_SetModel,			// void )	(ent, const szModel[])
	FM_ModelIndex,			// int )	(const szModel[])
	FM_ModelFrames,			// int )	(iModelIndex)
	FM_SetSize,			// void )	(ent, const Float:fMins[3], const Float:fMaxs[3])
	FM_ChangeLevel,			// void )	(szMap[], szSomething[])
	FM_VecToYaw,			// float )	(const Float:fVector[3])
	FM_VecToAngles,			// void )	(const Float:fVectorIn[3], Float:fVectorOut[3])
	FM_MoveToOrigin,		// void )	(ent, const Float:fGoal[3], Float:fDistance, iMoveType)
	FM_ChangeYaw,			// void )	(ent)
	FM_ChangePitch,			// void )	(ent)
	FM_FindEntityByString,		// edict )	(entStartSearchAfter, const szField[], const szValue[])
	FM_GetEntityIllum,		// int )	(ent)
	FM_FindEntityInSphere,		// edict )	(ent, const Float:fVector[3], Float:fRadius)
	FM_FindClientInPVS,		// edict )	(id)
	FM_EntitiesInPVS,		// edict )	(ent)
	FM_MakeVectors,			// void )	(const Float:fVector[3])
	FM_AngleVectors,		// void )	(const Float:fVec[3], Float:fForward[3], Float:fRight[3], Float:fUp[3])
	FM_CreateEntity,		// edict )	()
	FM_RemoveEntity,		// void )	(ent)
	FM_CreateNamedEntity,		// edict )	(iClassname)
	FM_MakeStatic,			// void )	(ent)
	FM_EntIsOnFloor,		// int )	(ent)
	FM_DropToFloor,			// int )	(ent)
	FM_WalkMove,			// int  )	(ent, Float:fYaw, Float:fDist, iMode)
	FM_SetOrigin,			// void )	(ent, const Float:fOrigin[3])
	FM_EmitSound,			// void )	(ent, iChannel, const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch)
	FM_EmitAmbientSound,		// void )	(ent, Float:fOrigin[3], const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch)
	FM_TraceLine,			// void )	(const Float:fV1[3], const Float:fV2[3], iNoMonsters, entToSkip, tr)
	FM_TraceToss,			// void )	(ent, entToIgnore, tr)
	FM_TraceMonsterHull,		// int )	(ent, const Float:fV1, const Float:fV2, iNoMonsters, entToSkip, tr)
	FM_TraceHull,			// void )	(const Float:fV1[3], const Float:fV2[3], iNoMonsters, iHullNumber, entToSkip, tr)
	FM_TraceModel,			// void )	(const Float:fV1[3], const Float:fV2[3], iHullNumber, ent, tr)
	FM_TraceTexture,		// char )	(entTexture, const Float:fV1[3], const Float:fV2[3])
	FM_TraceSphere,			// void )	(const Float:fV1[3], const Float:fV2[3], iNoMonsters, Float:fRadius, entToSkip, tr)
	FM_GetAimVector,		// void )	(ent, Float:fSpeed, Float:fReturn[3])
	FM_ParticleEffect,		// void )	(const Float:fOrigin[3], const Float:fDir[3], Float:fColor, Float:fCount)
	FM_LightStyle,			// void )	(iStyle, szVal[])
	FM_DecalIndex,			// int )	(const szName[])
	FM_PointContents,		// int )	(const Float:fOrigin[3])
	FM_MessageBegin,		// void )	(iMsg_Dest, iMsg_Type, const Float:fOrigin[3], ent)
	FM_MessageEnd,			// void )	()
	FM_WriteByte,			// void )	(iValue)
	FM_WriteChar,			// void )	(iValue)
	FM_WriteShort,			// void )	(iValue)
	FM_WriteLong,			// void )	(iValue)
	FM_WriteAngle,			// void )	(Float:fValue)
	FM_WriteCoord,			// void )	(Float:fValue)
	FM_WriteString,			// void )	(const szValue[])
	FM_WriteEntity,			// void )	(iValue)
	FM_CVarGetFloat,		// float )	(const szCvar[])
	FM_CVarGetString,		// char )	(const szCvar[])
	FM_CVarSetFloat,		// void )	(const szCvar[], Float:fValue)
	FM_CVarSetString,		// void )	(const szCvar[], szValue[])
	FM_FreeEntPrivateData,		// void )	(ent)
	FM_SzFromIndex,			// char )	(iString)
	FM_AllocString,			// int )	(const szValue[])
	FM_RegUserMsg,			// int )	(szName[], iSize)
	FM_AnimationAutomove,		// void )	(const ent, Float:fTime)
	FM_GetBonePosition,		// void )	(const ent, iBone, Float:fOrigin[3], Float:fAngle[3])
	FM_GetAttachment,		// void	)	(const ent, iAttachment, Float:fOrigin[3], Float:fAngle[3])
	FM_SetView,			// void )	(const ent, const entView)
	FM_Time,			// float )	()
	FM_CrosshairAngle,		// void )	(const ent, Float:fPitch, Float:fYaw)
	FM_FadeClientVolume,		// void )	(const ent, iFadePercent, iFadeOutSeconds, iHoldTime, iFadeInSeconds)
	FM_SetClientMaxspeed,		// void )	(const ent, Float:fMaxSpeed)
	FM_CreateFakeClient,		// edict )	(const szNetName[])
	FM_RunPlayerMove,		// void )	(const entFakeClient, Float:fViewAngles[3], Float:fForwardmove, Float:fSidemove, Float:fUpmove, iButtons, iImpulse, i_mSec)
	FM_NumberOfEntities,		// int ) 	()
	FM_StaticDecal,			// void )	(const Float:fOrigin[3], iDecalIndex, iEntityIndex, iModelIndex)
	FM_PrecacheGeneric,		// int )	(szString[])
	FM_BuildSoundMsg,		// void )	(ent, iChannel, const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch, iMsg_Dest, iMsg_Type, const Float:fOrigin[3], ent)
	FM_GetPhysicsKeyValue,		// char )	(const ent, const szKey[])
	FM_SetPhysicsKeyValue,		// void )	(const ent, const szKey[], const szValue[])
	FM_GetPhysicsInfoString,	// char )	(const ent)
	FM_PrecacheEvent,		// int )	(iType, const szEvent[])
	FM_PlaybackEvent,		// void )	(iFlags, const entInvoker, iEventIndex, Float:fDelay, Float:fOrigin[3], Float:fAngles[3], Float:fParam1, Float:fParam2, iParam1, iParam2, bool:bParam1, bool:bParam2)
	FM_CheckVisibility,		// int )	(const ent, iSet)
	FM_GetCurrentPlayer,		// int )	()
	FM_CanSkipPlayer,		// int )	(const ent)
	FM_SetGroupMask,		// void )	(iMask, iOp)
	FM_Voice_GetClientListening,	// bool )	(iReceiver, iSender)
	FM_Voice_SetClientListening,	// bool )	(iReceiver, iSender, bool:bListen)
	FM_InfoKeyValue,		// char )	(szInfoBuffer[], szKey[])
	FM_SetKeyValue,			// void )	(szInfoBuffer[], szKey[], szValue[])
	FM_SetClientKeyValue,		// void )	(iClientIndex, szInfoBuffer[], szKey[], szValue[])
	FM_GetPlayerAuthId,		// char )	(ent)
	FM_GetPlayerWONId,		// char )	(ent)
	FM_IsMapValid,			// int )	(szFileName[])


	FM_Spawn,			// int )	(ent)
	FM_Think,			// void )	(ent)
	FM_Use,				// void )	(entUsed, entOther)
	FM_Touch,			// void )	(entTouched, entOther)
	FM_Blocked,			// void )	(entBlocked, entOther)
	FM_KeyValue,			// void )	(keyvalue, kvd_id)
	FM_SetAbsBox,			// void )	(ent)
	FM_ClientConnect,		// bool )	(ent, const szName[], const szAddress[], const szRejectReason[128])
	
	FM_ClientDisconnect,		// void )	(ent)
	FM_ClientKill,			// void )	(ent)
	FM_ClientPutInServer,		// void )	(ent)
	FM_ClientCommand,		// void )	(ent)

	FM_ServerDeactivate,		// void )	()

	FM_PlayerPreThink,		// void )	(ent)
	FM_PlayerPostThink,		// void )	(ent)

	FM_StartFrame,			// void )	()
	FM_ParmsNewLevel,		// void )	()
	FM_ParmsChangeLevel,		// void )	()

	 // Returns string describing current .dll.  E.g., TeamFotrress 2, Half-Life
	FM_GetGameDescription,	 	// char )	()

	// Spectator funcs
	FM_SpectatorConnect,		// void )	(ent)
	FM_SpectatorDisconnect,		// void )	(ent)
	FM_SpectatorThink,		// void )	(ent)

	// Notify game .dll that engine is going to shut down.  Allows mod authors to set a breakpoint.
	FM_Sys_Error,			// void )	(const szError[])

	FM_PM_FindTextureType,		// char )	(szType[])
	FM_RegisterEncoders,		// void )	()

	// Enumerates player hulls.  Returns 0 if the hull number doesn't exist, 1 otherwise

	// Create baselines for certain "unplaced" items.
	FM_CreateInstancedBaseline,	// void )	()
	FM_AllowLagCompensation,	// int )	()
	
	FM_AlertMessage,		// void )	(AlertType:aType, szBuffer[])

	// NEW_DLL_FUNCTIONS:
	FM_OnFreeEntPrivateData,	// void )	(ent)
	FM_GameShutdown,		// unknown )	()
	FM_ShouldCollide,		// unknown )	(entTouched, entOther)

	// LATE ADDITIONS (v1.71)
	FM_ClientUserInfoChanged,	// void )	(ent, szInfo[])
	
	// LATE ADDITIONS (v1.75)
	FM_UpdateClientData,		// void )	(const ent, iSendWeapons, cd_handle)
	FM_AddToFullPack,		// int )	(entState, e, ent, host, iHostFlags, iPlayer, pSet)
	FM_CmdStart,			// void )	(const ent, uc_handle, seed)
	FM_CmdEnd,			// void )	(const ent)
	FM_CreateInstBaseline,		// int )	(classname, baseline)
	FM_CreateBaseline,		// void )	(iPlayer, i_eIndex, baseline, ent, iPlayerModelIndex, Float:fMins[3], Float:fMaxs[3])
	FM_GetInfoKeyBuffer,		// char )	(ent)
	FM_ClientPrintf 		// void )	(ent, type, const szMsg[])

	// LATE ADDITIONS (v1.80)
	FM_ServerPrint			// void )	(const szMsg[])
};
[/SPOIL]
 
Chỉnh sửa cuối:
Forward theo mình hiểu nôm na thì nó cũng là 1 public nhưng nó có thể tự call, ví dụ như Forward Death, khi mình chết forward này tự chạy và thực hiện code trong public forward đó
-> register_forward(FM_******, "fw_*****")

muốn biết có những forward gì mở fakemeta_const ra
 
- Khởi đầu thành công và sau đó... thất bại.
- Tui đưa ZB3 lên sv cho tụi nó chơi, chơi 1 hồi lâu cũng khá nhiều người chơi. Nhưng chơi 1 hồi tụi nó chê nhảm, giờ fix xong tới lượt sv hư. Thôi buồn :(. Thôi thì ko chạy sv nữa, share cho ae bản Zombie Mod 3 của SonTung0 đã được tách rời ra khỏi NST WPN và NST Player. Và các class của ZB3 cũng dc tách ra.

[ZOMBIE MOD 3]
- Phiên bản đã được tách rời khỏi NST WPN và NST PLAYER.
- Author: Sontung0
- Edit, Modify: Dias

Plugins:
- http://www.mediafire.com/?5k05yyb7hjpsykg
Resource:
- http://www.mediafire.com/?l5hf0odtvaae5da
Extra Item (thích thêm extra item thì cái cái này. Có sẵn 7 extra item)
- http://www.mediafire.com/?9cwycu7nnciclk4

[LIST FILE] (Sma + Amxx)
- Zombie_Mod3.sma
-------------------------
- zb3_zclass_normal.sma
- zb3_zclass_speed.sma
- zb3_zclass_heavy.sma
- zb3_zclass_pc.sma
- zb3_zclass_heal.sma
- zb3_zclass_deimos.sma
- zb3_zclass_banshee.sma
- zb3_zclass_stamper.sma
-------------------------
- zb3_shop.sma
-------------------------
- zb3_item_skull_axe.sma
- zb3_item_dual_infinity.sma
- zb3_item_dualkriss.sma
- zb3_item_m95.sma (Barrett)
- zb3_item_svdex.sma
- zb3_item_rheinmetall_mg3.sma
- zb3_item_rocket_launcher.sma

Bạn dias kiểm tra hộ mình với cái file Zombie_Mod3.sma có 2 lỗi không thể compiled được.
Muốn nghịch tí mà không được. Thank!
 
dạ em cảm ơn, cài đc rồi, dưng mà khi vào game, chọn newgame, chọn map xong start, nó chạy đến khi gần xong Parsing game info... thì văng ra desktop, đó là khi em chưa thêm plugin gì, mà tiện cho e hỏi khi thêm plugin trong plugin.ini rồi thì file amxx để đâu ạ
 
dạ em cảm ơn, cài đc rồi, dưng mà khi vào game, chọn newgame, chọn map xong start, nó chạy đến khi gần xong Parsing game info... thì văng ra desktop, đó là khi em chưa thêm plugin gì, mà tiện cho e hỏi khi thêm plugin trong plugin.ini rồi thì file amxx để đâu ạ
Có lẽ vấn đề ở đây là CS1.6V7 nó đã quá cũ, có thể k tuơng thích với amx, mình khuyên bạn down bản mới nhất là CS1.6 V40, đây là bản rất ổn định, có thể tìm thấy trong topic download. Nếu k muốn down nhiều thì tải bạn này : http://forum.gamevn.com/showpost.php?p=18709544, tuơng thích rất tốt mà vẫn nhẹ :))
File amxx đặt vào folder plugins :))
 
thanks anh nữa:D, mà em add plugin level_up_without_zom... rôif làm sao để nó lên lv khi chơi bot nhỉ, cả plugin súng nữa, làm sao để mua đc mí khẩu đó, có cần code gì trong AMX mod x studio k( nút thanks đâu rồi ta)
 
Mấy pác fix dùm em cái này với... Tưởng đâu complie được là xong nhưng vào game thì ko hiện được ở List zombie :((
PHP:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <nst_zombie>

#define PLUGIN "BDD Nu y ta"
#define VERSION "1.0"
#define AUTHOR "RIP CODE NST"


new spr_skill[] = "g_invisible"
new idclass
new zombie_name[] = "Nu y ta", zombie_model[] = "bdd_nuyta"
new zombie_health = 3500, zombie_sex = 2, zombie_modelindex = 3, zombie_boss = 0, Float:zombie_gravity = 0.7, Float:zombie_speed = 295.0, Float:zombie_knockback = 6.0
new zombie_sound_death1[] = "bdd_zombie/nuyta_die1.wav", zombie_sound_death2[] = "bdd_zombie/nuyta_die2.wav", zombie_sound_hurt1[]= "bdd_zombie/nuyta_hurt1.wav", zombie_sound_hurt2[]= "bdd_zombie/nuyta_hurt2.wav", zombie_sound_evolution[]= "bdd_zombie/nuyta_evolution.wav",zombie_sound_heal[]= "bdd_zombie/hoimau.wav", zombie_sound_invisible[]= "bdd_zombie/nuyta_tanghinh.wav"
new Float:invisible_time = 15.0, Float:invisible_timewait = 1.0,invisible_dmg = 500, Float:invisible_speed = 295.0, Float:invisible_gravity = 0.7, Float:invisible_alpha = 2.0


new g_invisible[33], g_invisible_wait[33], g_check[33], g_modelwpn[64], g_modelwpn_invisible[64], g_msgStatusIcon

// Task offsets
enum (+= 100)
{
	TASK_INVISIBLE = 2000,
	TASK_WAIT_INVISIBLE,
	TASK_INVISIBLE_SOUND,
	TASK_BOT_USE_SKILL
}
// IDs inside tasks
#define ID_INVISIBLE (taskid - TASK_INVISIBLE)
#define ID_WAIT_INVISIBLE (taskid - TASK_WAIT_INVISIBLE)
#define ID_INVISIBLE_SOUND (taskid - TASK_INVISIBLE_SOUND)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)



public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)

	
	// msg
	g_msgStatusIcon = get_user_msgid("StatusIcon")
	
	// Events
	register_logevent("logevent_round_start",2, "1=Round_Start")
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_event("DeathMsg", "Death", "a")
	register_forward(FM_CmdStart, "fw_CmdStart")
	register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
	
	// clien cmd
	//register_concmd("ww", "ww")
	register_clcmd("drop", "cmd_invisible")
}
public plugin_precache()
{

	formatex(g_modelwpn, charsmax(g_modelwpn), "models/bdd_zombie_class/v_%s.mdl", zombie_model)
	formatex(g_modelwpn_invisible, charsmax(g_modelwpn_invisible), "models/bdd_zombie_class/v_%s_tanghinh.mdl", zombie_model)
	engfunc(EngFunc_PrecacheModel, g_modelwpn)
	engfunc(EngFunc_PrecacheModel, g_modelwpn_invisible)
	engfunc(EngFunc_PrecacheSound, zombie_sound_invisible)
	
	// register zombie class
	new modrun = nst_zb_get_mod()
	if (modrun==NSTZB_ZB3) idclass = nst_zb3_register_zombie_class(zombie_name, zombie_model, zombie_gravity, zombie_speed, zombie_knockback, zombie_sound_death1, zombie_sound_death2, zombie_sound_hurt1, zombie_sound_hurt2, zombie_sound_heal, zombie_sound_evolution, zombie_sex, zombie_modelindex)
	if (modrun==NSTZB_ZBU) idclass = nst_zbu_register_zombie_class(zombie_name, zombie_model, zombie_health, zombie_gravity, zombie_speed, zombie_knockback, zombie_sound_death1, zombie_sound_death2, zombie_sound_hurt1, zombie_sound_hurt2, zombie_sound_heal, zombie_sex, zombie_modelindex)
	if (modrun==NSTZB_ZBS) idclass = nst_zbs_register_zombie_class(zombie_name, zombie_model, zombie_health, zombie_gravity, zombie_speed, zombie_knockback, zombie_sound_death1, zombie_sound_death2, zombie_sound_hurt1, zombie_sound_hurt2, zombie_sound_heal, zombie_sex, zombie_modelindex, zombie_boss)

}
public event_round_start()
{
	for (new id=1; id<33; id++)
	{
		if (!is_user_connected(id)) continue;
		
		reset_value_player(id)
		StatusIcon(id, spr_skill, 0)
	}
}
public logevent_round_start()
{
	for (new id=1; id<33; id++)
	{
		if (!is_user_connected(id)) continue;
		if (is_user_bot(id))
		{
			if (task_exists(id+TASK_BOT_USE_SKILL)) remove_task(id+TASK_BOT_USE_SKILL)
			set_task(float(random_num(5,15)), "bot_use_skill", id+TASK_BOT_USE_SKILL)
		}
	}
}
public Death()
{
	new victim = read_data(2) 
	StatusIcon(victim, spr_skill, 0)
	reset_value_player(victim)
}
public client_connect(id)
{
	reset_value_player(id)
}
public client_disconnect(id)
{
	reset_value_player(id)
}
reset_value_player(id)
{
	if (task_exists(id+TASK_INVISIBLE)) remove_task(id+TASK_INVISIBLE)
	if (task_exists(id+TASK_WAIT_INVISIBLE)) remove_task(id+TASK_WAIT_INVISIBLE)
	if (task_exists(id+TASK_BOT_USE_SKILL)) remove_task(id+TASK_BOT_USE_SKILL)

	g_invisible[id] = 0
	g_invisible_wait[id] = 0
	g_check[id] = 0
}

// bot use skill
public bot_use_skill(taskid)
{
	new id = ID_BOT_USE_SKILL
	if (!is_user_bot(id)) return;

	cmd_invisible(id)
	if (task_exists(taskid)) remove_task(taskid)
	set_task(float(random_num(5,15)), "bot_use_skill", id+TASK_BOT_USE_SKILL)
}

// #################### INVISIBLE PUBLIC ####################
// cmd invisible
public cmd_invisible(id)
{
	if (!is_user_alive(id) || !nst_zb_get_take_damage()) return PLUGIN_CONTINUE

	if (nst_zb_get_mod()==NSTZB_ZBS) invisible_dmg = 0
	new health = get_user_health(id) - invisible_dmg
	if (idclass==nst_zb_get_user_zombie_class(id) && nst_zb_get_user_zombie(id) && health>0 && !g_invisible[id] && !g_invisible_wait[id])
	{
	
		// set task
		new Float:time_invi, level
		level = nst_zb_get_user_level(id)
		if (level==1)
		{
			client_print(id,print_chat,"Ban chua su dung duoc tuyet chieu")
			return PLUGIN_CONTINUE
		}
		else
		{
			time_invi = invisible_time
			g_invisible[id] = 1
			set_wpnmodel(id)
		}
		if (task_exists(id+TASK_INVISIBLE)) remove_task(id+TASK_INVISIBLE)
		set_task(time_invi, "RemoveInvisible", id+TASK_INVISIBLE)
		
		// set health when invisible
		fm_set_user_health(id, health)
		
		// play sound
		PlayEmitSound(id, zombie_sound_invisible)
		if (task_exists(id+TASK_INVISIBLE_SOUND)) remove_task(id+TASK_INVISIBLE_SOUND)
		set_task(2.0, "InvisibleSound", id+TASK_INVISIBLE_SOUND, _, _, "b")

		// send msg
		new message[100]
		format(message, charsmax(message), "^x04[Zombie v3]^x01 %s","Ban dang choi Zombie v3 in CF zero")
		nst_zb_color_saytext(id, message)

		//client_print(id, print_chat, "[%i]", fnFloatToNum(time_invi))
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}
public InvisibleSound(taskid)
{
	new id = ID_INVISIBLE_SOUND
	
	if (g_invisible[id]) PlayEmitSound(id, zombie_sound_invisible)
	else if (task_exists(taskid)) remove_task(taskid)
}
public RemoveInvisible(taskid)
{
	new id = ID_INVISIBLE
	
	// remove invisible
	g_invisible[id] = 0
	set_wpnmodel(id)
	fm_set_rendering(id)
	if (task_exists(taskid)) remove_task(taskid)
	
	// send msg
	new message[100]
	format(message, charsmax(message), "^x04[Zombie v3]^x01 %s","Ban co the su dung tuyet chieu sau 1 giay nua")
	nst_zb_color_saytext(id, message)

	// set speed & gravity
	set_pev(id, pev_maxspeed,zombie_speed)
	set_pev(id, pev_gravity, zombie_gravity)
	
	// set time wait
	g_invisible_wait[id] = 1
	if (task_exists(id+TASK_WAIT_INVISIBLE)) remove_task(id+TASK_WAIT_INVISIBLE)
	set_task(invisible_timewait, "RemoveWaitInvisible", id+TASK_WAIT_INVISIBLE)
}
public RemoveWaitInvisible(taskid)
{
	new id = ID_WAIT_INVISIBLE
	g_invisible_wait[id] = 0
	if (task_exists(taskid)) remove_task(taskid)
}
public fw_CmdStart(id, uc_handle, seed)
{
	if (!is_user_alive(id)) return;
	
	if (idclass==nst_zb_get_user_zombie_class(id) && nst_zb_get_user_zombie(id))
	{
		// check invisible
		if (g_invisible[id] && !g_invisible_wait[id])
		{
			// set invisible
			new Float:velocity[3], velo, alpha
			pev(id, pev_velocity, velocity)
			velo = sqroot(floatround(velocity[0] * velocity[0] + velocity[1] * velocity[1] + velocity[2] * velocity[2]))/10
			alpha = floatround(float(velo)*invisible_alpha)
			fm_set_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha, alpha)	
			//client_print(id, print_chat, "[%i][%i]", velo, alpha)
		}

		// show status icon help
		if ( (g_invisible[id] || g_invisible_wait[id]) && g_check[id] != 2)
		{
			g_check[id] = 2
			StatusIcon(id, spr_skill, 2)
		}
		else if (g_check[id] != 1)
		{
			g_check[id] = 1
			StatusIcon(id, spr_skill, 1)
		}
	}
	else if (g_check[id])
	{
		// hide status icon
		g_check[id] = 0
		StatusIcon(id, spr_skill, 0)
	}
	
	
	return;
}
// set speed
public fw_PlayerPreThink(id)
{
	if (!is_user_alive(id)) return;
	
	if (idclass==nst_zb_get_user_zombie_class(id) && nst_zb_get_user_zombie(id) && g_invisible[id])
	{
		// set gravity speed when invisible
		set_pev(id, pev_maxspeed,invisible_speed)
		set_pev(id, pev_gravity, invisible_gravity)
	}
}
set_wpnmodel(id)
{
	if (!is_user_alive(id)) return;
	
	// set model wpn invisible
	if (get_user_weapon(id) == CSW_KNIFE)
	{
		if (g_invisible[id]) set_pev(id, pev_viewmodel2, g_modelwpn_invisible)
		else set_pev(id, pev_viewmodel2, g_modelwpn)
	}
	
}
PlayEmitSound(id, const sound[])
{
	emit_sound(id, CHAN_VOICE, sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) 
{
	new Float:RenderColor[3];
	RenderColor[0] = float(r);
	RenderColor[1] = float(g);
	RenderColor[2] = float(b);

	set_pev(entity, pev_renderfx, fx);
	set_pev(entity, pev_rendercolor, RenderColor);
	set_pev(entity, pev_rendermode, render);
	set_pev(entity, pev_renderamt, float(amount));

	return 1;
}
StatusIcon(id, sprname[], run)
{	
	if (!is_user_connected(id)) return;
	
	message_begin(MSG_ONE, g_msgStatusIcon, {0,0,0}, id);
	write_byte(run); // status (0=hide, 1=show, 2=flash)
	write_string(sprname); // sprite name
	message_end();
}
fm_set_user_health(id, health)
{
	(health > 0) ? set_pev(id, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, id);
}
 
tương tự plugin NST_Effects_Killer có cả file amxx và scrip rồi, cho hết vô rồi mà vẫn k dùng đc, giúp e với
 
tương tự plugin NST_Effects_Killer có cả file amxx và scrip rồi, cho hết vô rồi mà vẫn k dùng đc, giúp e với
K dùng đc là đương nhiên r`, vì bạn đâu có cho mấy file sprites vào đâu, vì đây là plugin liên quan đến hiển thị sprites mà .
 
@gacon:
- lỗi thì phải paste ra đây, còn vụ mà warning thì ko sao đâu, tôi sửa chút ít thôi
 
Back
Top