Szerző Téma: Controlable NPC  (Megtekintve 11620 alkalommal)

Controlable NPC
« Dátum: 2011. Március 27. - 14:32:14 »
+4 Show voters
Üdv! Ez a jó dolog már nem letölthetõ a hiv. fórumról,mert van benne egy szabálytalan rész amiért Kye bannolta a fejlesztõket. Azért ide feltöltöm, viszont a tiltott függvényt nem ajánlom használni. Ez arra szolgál,hogy a kliensed valódi játékosként érzékeli az NPC-ket és számolja õket a szerver telítetségénél.
 
CreateNPCPlayer(id,name[]);

 
Ezt a függvényt NE használjátok.
A többit nyugodtan.
A pluginról
A plugin nagyszerû lehetõségeket biztosít az NPC-k kezelésére és nagyban megkönnyítik a dolgunkat is.
 

// core
native CreateNPC(npcid,npcname[]);
native CreateNPCPlayer(id,name[]);
native IsValidNPC(npcid);
native DestroyNPC(npcid);
native KillNPC(npcid);
native SpawnNPC(npcid);
native PutNPCInVehicle(npcid,vehicleid,seat);
native StopNPC(npcid);
native SetNPCImpregnable(npcid,istate);
native IsNPCImpregnable(npcid);
native GetNPCState(npcid);
native ToogleVisualDeath(tstate);
native DisableJoinPartLogging();
native FindLastFreeSlot();
// on foot controlls
native SetNPCPos(npcid,Float:X,Float:Y,Float:Z);
native GetNPCPos(npcid,&Float:X,&Float:Y,&Float:Z);
native SetNPCFacingAngle(npcid,Float:angle);
native Float:GetNPCFacingAngle(npcid);
native SetNPCVelocity(npcid,Float:X,Float:Y,Float:Z);
native GetNPCVelocity(npcid,&Float:X,&Float:Y,&Float:Z);
native SetNPCKeys(npcid,updown,leftright,keys);
native GetNPCKeys(npcid,&updown,&leftright,&keys);
native SetNPCSkin(npcid,skin);
native GetNPCSkin(npcid);
native SetNPCInterior(npcid,interior);
native GetNPCInterior(npcid);
native SetNPCSpecialAction(npcid,action);
native GetNPCSpecialAction(npcid);
native SetNPCWeapon(npcid,weaponid);
native GetNPCWeapon(npcid);
native SetNPCWeaponSkillLevel(npcid,weapontype,level);
native GetNPCWeaponSkillLevel(npcid,weapontype);
native SetNPCHealth(npcid,Float:amount);
native Float:GetNPCHealth(npcid);
native SetNPCArmour(npcid,Float:amount);
native Float:GetNPCArmour(npcid);
native SetNPCSurfing(npcid,Float:X,Float:Y,Float:Z);
native GetNPCSurfing(npcid,&Float:X,&Float:Y,&Float:Z);
native SetNPCSurfingVehicle(npcid,vehicleid);
native GetNPCSurfingVehicle(npcid);
// aim controls
native SetNPCCameraPos(npcid,Float:X,Float:Y,Float:Z);
native GetNPCCameraPos(npcid,&Float:X,&Float:Y,&Float:Z);
native SetNPCCameraFrontVector(npcid,Float:X,Float:Y,Float:Z);
native GetNPCCameraFrontVector(npcid,&Float:X,&Float:Y,&Float:Z);
native SetNPCCameraMode(npcid,mode);
native GetNPCCameraMode(npcid);
native SetNPCWeaponState(npcid,wstate);
native GetNPCWeaponState(npcid);
// driver controls
native SetNPCVehiclePos(npcid,Float:X,Float:Y,Float:Z);
native GetNPCVehiclePos(npcid,&Float:X,&Float:Y,&Float:Z);
native SetNPCVehicleQuaternion(npcid,Float:X,Float:Y,Float:Z,Float:Scal);
native GetNPCVehicleQuaternion(npcid,&Float:X,&Float:Y,&Float:Z,&Float:Scal);
native SetNPCVehicleVelocity(npcid,Float:X,Float:Y,Float:Z);
native GetNPCVehicleVelocity(npcid,&Float:X,&Float:Y,&Float:Z);
native SetNPCVehicleKeys(npcid,updown,leftright,keys);
native GetNPCVehicleKeys(npcid,&updown,&leftright,&keys);
native SetNPCVehicleSiren(npcid,vstate);
native GetNPCVehicleSiren(npcid);
native SetNPCVehicleWeapon(npcid,weaponid);
native GetNPCVehicleWeapon(npcid);
// standart actions
native NPC_WalkTo(npcid,Float:X,Float:Y,Float:Z,is_z_map);
native NPC_RunTo(npcid,Float:X,Float:Y,Float:Z,is_z_map);
native NPC_SprintTo(npcid,Float:X,Float:Y,Float:Z,is_z_map);
native NPC_CrouchTo(npcid,Float:X,Float:Y,Float:Z,is_z_map);
native NPC_Jump(npcid);
native NPC_LookAt(npcid,Float:X,Float:Y,Float:Z);
native NPC_AimAt(npcid,Float:X,Float:Y,Float:Z);
native NPC_ShotAt(npcid,Float:X,Float:Y,Float:Z);
native NPC_DriveTo(npcid,Float:X,Float:Y,Float:Z,Float:speed,is_z_map);
// damage config
native SetWeaponDamageForNPC(weaponid,Float:damage);
native SetWeaponReloadTimeForNPC(weaponid,mstime);
// .rec playbacks
native StartRecordingPlayback(npcid,name[]);
native PauseRecordingPlayback(npcid);
native ContinueRecordingPlayback(npcid);
native StopRecordingPlayback(npcid);
// GTA SA paths
native Node:OpenNode(name[]);
native CloseNode(Node:nodeid);
native GetNodeHeader(Node:nodeid,&nodes,&vehicle_nodes,&ped_nodes,&navi_nodes);
native SetNodePoint(Node:nodeid,pointid);
native GetNodePoint(Node:nodeid);
native GetNodePointPos(Node:nodeid,&Float:X,&Float:Y,&Float:Z);
native GetNodePointLinkId(Node:nodeid);
native GetNodePointAreaId(Node:nodeid);
native GetNodePointWidth(Node:nodeid);
native GetNodePointLinkCount(Node:pointid);
native GetNodePointTrafficLevel(Node:nodeid);
native IsNodePointRoadBlock(Node:nodeid);
native IsNodePointBoats(Node:nodeid);
native IsNodePointEmergency(Node:nodeid);
native IsNodePointNotHighway(Node:nodeid);
native IsNodePointSpawn(Node:nodeid);
native IsNodePointRoadBlock1(Node:nodeid);
native IsNodePointParking(Node:nodeid);
native IsNodePointRoadBlock2(Node:nodeid);
native GetNodePointType(Node:nodeid);
native SetNodeLink(Node:nodeid,linkid);
native GetNodeLinkAreaId(Node:nodeid);
native GetNodeLinkNodeId(Node:nodeid);
// ZMap
native ZMap_Init(mapname[]);
native Float:ZMap_GetZForCoords(Float:X,Float:Y);
// Rolls
native Float:ConvertRollToGrad(Float:roll);
native Float:ConvertGradToRoll(Float:grad);
// CPlayer structure
native GetPlayerStructureInfoByte(playerid,structure_offset);
native GetPlayerStructureInfoInt(playerid,structure_offset);
native Float:GetPlayerStructureInfoFloat(playerid,structure_offset);
// CVehicle structure
native GetVehicleStructureInfoByte(vehicleid,structure_offset);
native GetVehicleStructureInfoInt(vehicleid,structure_offset);
native Float:GetVehicleStructureInfoFloat(vehicleid,structure_offset);
// Foot sync
native GetFootSyncDataByte(playerid,offset);
native GetFootSyncDataInt(playerid,offset);
native Float:GetFootSyncDataFloat(playerid,offset);

 
Eljárások:
 

//
//   Callbacks
//
forward OnNPCGetDamage(npcid,playerid,Float:health_loss,bodypart);
forward OnRecordingPlaybackEnd(npcid,reason);
forward OnNPCMovingComplete(npcid);
forward OnNPCSpawn(npcid);
forward OnNPCDeath(npcid,killerid,reason);

 


Windows:
LETÖLTÉS
Linux 0.3c verziós:
 
« Utoljára szerkesztve: 2012. Április 26. - 17:01:49 írta kurta999 »

Yeaseiro

  • Vendég
Controlable NPC
« Válasz #1 Dátum: 2011. Március 27. - 14:38:47 »
0 Show voters
Thanks, Chuck! I go test it ;D
E: FIRST!!!!4!!FOR!!FOUR!!!!

Nem elérhető Bart

  • 4111
    • Profil megtekintése
Controlable NPC
« Válasz #2 Dátum: 2011. Március 27. - 14:39:23 »
0 Show voters
Jó kis plugin, én használom, és az egyik készítõ msn-je meg is van.  :angel:
De azt kifelejtetted, hogy csak windows-on megy.  :)

Controlable NPC
« Válasz #3 Dátum: 2011. Március 27. - 14:39:51 »
0 Show voters
Idézetet írta: Bart date=1301229563\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7123\" data-ipsquote-contentclass=\"forums_Topic
Jó kis plugin, én használom, és az egyik készítõ msn-je meg is van.  :angel:
De azt kifelejtetted, hogy csak windows-on megy.  :)
 
Ja tényleg,izé,beleírom  :D

Yeaseiro

  • Vendég
Controlable NPC
« Válasz #4 Dátum: 2011. Március 27. - 14:41:26 »
0 Show voters
Nincs meg a source kódja véletlenül? :(

Controlable NPC
« Válasz #5 Dátum: 2011. Március 27. - 14:42:23 »
0 Show voters
Nincs  :(

Nem elérhető Bart

  • 4111
    • Profil megtekintése
Controlable NPC
« Válasz #6 Dátum: 2011. Március 27. - 14:43:06 »
0 Show voters
Idézetet írta: Stan_Smith date=1301229686\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7123\" data-ipsquote-contentclass=\"forums_Topic
Nincs meg a source kódja véletlenül? :(
 
Ahh nagy nehezen talán meg tudom szerezni az egyik fejlesztõtõl, de nem biztos.
Lehet hogy nem akarja majd odaadni, de megpróbálom  :)

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Controlable NPC
« Válasz #7 Dátum: 2011. Március 27. - 14:44:15 »
0 Show voters
Én ezt használom a sima helyett. Sokkal könnyebb vele a munka és jobb a kezelhetõsége. 10/10


CreateNPCPlayer(id,name[]);

 
Lehet használni, csak ha lebuksz akkor letiltják a szerveredet a Mester Szerverrõl. (A Kliens nem fogja kijelezni)

Nem elérhető Bart

  • 4111
    • Profil megtekintése
Controlable NPC
« Válasz #8 Dátum: 2011. Március 27. - 14:45:51 »
0 Show voters
Idézetet írta: .:: IceMan ::. date=1301229855\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7123\" data-ipsquote-contentclass=\"forums_Topic

CreateNPCPlayer(id,name[]);

 
Lehet használni, csak ha lebuksz akkor letiltják a szerveredet a Mester Szerverrõl. (A Kliens nem fogja kijelezni)
 
Csak azt nem értem, hogy buknál le  ::|
Van rá valami rendszerük ami jelzi ha valaki használja?

Controlable NPC
« Válasz #9 Dátum: 2011. Március 27. - 14:47:33 »
0 Show voters
Idézetet írta: .:: IceMan ::. date=1301229855\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7123\" data-ipsquote-contentclass=\"forums_Topic
Én ezt használom a sima helyett. Sokkal könnyebb vele a munka és jobb a kezelhetõsége. 10/10


CreateNPCPlayer(id,name[]);

 
Lehet használni, csak ha lebuksz akkor letiltják a szerveredet a Mester Szerverrõl. (A Kliens nem fogja kijelezni)
 
Megkéred a hostot h rakja át más IPre a szervert és kész  :D

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Controlable NPC
« Válasz #10 Dátum: 2011. Március 27. - 14:48:52 »
0 Show voters
Idézetet írta: Bart date=1301229951\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"7123\" data-ipsquote-contentclass=\"forums_Topic


 
CreateNPCPlayer(id,name[]);

 
Lehet használni, csak ha lebuksz akkor letiltják a szerveredet a Mester Szerverrõl. (A Kliens nem fogja kijelezni)
 
Csak azt nem értem, hogy buknál le  ::|
Van rá valami rendszerük ami jelzi ha valaki használja?
 
[/quote]
Egyszerû..
Ha valaki észreveszi egy szerveren, hogy ezt használják, akkor IP-vel együtt jelenti és utánajárnak, ha tényleg használják akkor tiltják.

Yeaseiro

  • Vendég
Controlable NPC
« Válasz #11 Dátum: 2011. Március 27. - 14:55:06 »
0 Show voters
ahahaahahahah lefagytak az NPC-k mikor betöltöttem a MySQL-t :D

Gang[St]e[R]

  • Vendég
Controlable NPC
« Válasz #12 Dátum: 2011. Március 27. - 16:15:34 »
0 Show voters
Mivel Kye betiltatta ezért illegális nem?
Szerintem nem kellene kitenni :S

Yeaseiro

  • Vendég
Controlable NPC
« Válasz #13 Dátum: 2011. Március 27. - 16:20:16 »
0 Show voters
\" post=\"124996\" timestamp=\"1301235334\"]
Mivel Kye betiltatta ezért illegális nem?
Szerintem nem kellene kitenni :S
 
[/quote]
Nem tud magyarul :D Ha megis akkor... :-\\
Ha meglenne a source akkor valószínûleg megcsinálom/megcsináljuk linuxra is és
ha lehet akkor kiveszünk pár funkciót :angry:
hahahahaha levegõ lettem :D
« Utoljára szerkesztve: 2011. Március 27. - 16:51:28 írta Stan_Smith »

Nem elérhető nyE

  • 1745
    • Profil megtekintése
Controlable NPC
« Válasz #14 Dátum: 2011. Március 27. - 16:46:18 »
0 Show voters
Kár, hogy nincs linuxra. Sok szervergép azon van.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal