New pages

Jump to navigation Jump to search
New pages
Hide bots | Show redirects
  • 17:34, 29 October 2024IsPlaybackPaused (hist | edit) ‎[470 bytes]Habi (talk | contribs) (Created page with "{{v1_8_beta}} {{Welcome|desc=This function tells whether any playback is in paused state.| params=<source>NoParams</source>| example=<source lang="lua"> if(IsPlaybackRunning()) { if(IsPlaybackPaused()) print("The playback is paused\n"); }| retvals=true, if playback is paused and false otherwise(playback is not running or running but not paused)| note=This function returns false when playback is not running| relfuncs=*IsPlaybackRunning }}")
  • 17:29, 29 October 2024IsPlaybackRunning (hist | edit) ‎[339 bytes]Habi (talk | contribs) (Created page with "{{v1_8_beta}} {{Welcome|desc=This function is used to determine if the playback is running| params=<source>NoParams</source>| retvals=false, if playback is not running or paused. true otherwise| relfuncs=*IsPlaybackPaused *StartRecordingPlayback *StopRecordingPlayback *PauseRecordingPlayback *ResumeRecordingPlayback}}")
  • 17:25, 29 October 2024GetMyColor (hist | edit) ‎[236 bytes]Habi (talk | contribs) (Created page with "{{v1_8_beta}} {{Welcome|desc=This function is used to find the color(r,g,b) of NPC itself.| params=<source>NoParams</source>| retvals=This function returns a table with keys <source inline>r,g,b</source>.| relfuncs=*GetPlayerColor}}")
  • 17:23, 29 October 2024GetPlayerColor (hist | edit) ‎[421 bytes]Habi (talk | contribs) (Created page with "{{v1_8_beta}} {{Welcome|desc=This function is used to find the color(r,g,b) of another player(the marker in map as well as name tag).| params=<source>(playerid)</source> <poem>::playerid : The ID of the target player whose color is to be found. </poem>| retvals=This function returns a table with keys <source inline>r,g,b</source> on success and null on failure(target player does not exist)|}}")
  • 17:16, 29 October 2024SendPrivMsg (hist | edit) ‎[470 bytes]Habi (talk | contribs) (Created page with "{{v1_8_beta}} {{Welcome|desc=This function sends a private message to another player.| params=<source>(playerid, message)</source> <poem> ::playerid : The ID of the target player to whom private message is to be send. ::message : The message to send. </poem>| example=<source> function OnPlayerStreamIn(playerid) { SendPrivMsg(playerid, "Come near me"); } </source>| retvals=true on success, false on failure(invalid playerid)| relfuncs=*SendChat}}")
  • 17:09, 29 October 2024GetMyArmour (hist | edit) ‎[305 bytes]Habi (talk | contribs) (Created page with "{{v1_8_beta}} {{Welcome|desc=This function returns the Armour of the NPC|params=<source>NoParams</source>| example=<source> if(AmISpawned()) { print("I have armour "+GetMyArmour()+"\n"); } </source>| retvals=The Armour of npc.| relfuncs=*GetPlayerArmour *GetMyHealth}}")
  • 17:06, 29 October 2024GetMyTeam (hist | edit) ‎[265 bytes]Habi (talk | contribs) (Created page with "{{v1_8_beta}} {{Welcome|desc=This function will return the team ID (0-255) of NPC.| params=<source inline>NoParams</source>|example=<source>print("My Team ID is "+ GetMyTeam()+ "\n");</source>| retvals=The Team ID of the npc|relfuncs= *GetPlayerTeam *GetMySkin|}}")
  • 17:02, 29 October 2024GetMySkin (hist | edit) ‎[222 bytes]Habi (talk | contribs) (Created page with "{{v1_8_beta}} {{Welcome|Returns the skin ID of the NPC.| params=<source>NoParams</source>| example=<source inline>local myskin=GetMySkin()</source>| retvals=The Skin ID of the NPC.| relfuncs=*GetPlayerSkin|}}")
  • 16:58, 29 October 2024LookAtPos (hist | edit) ‎[453 bytes]Habi (talk | contribs) (Created page with "{{Welcome| desc=This function sets the angle of npc such that it looks at the position given| params=<syntaxhighlight lang="lua"> pos</syntaxhighlight> <poem>::pos : The Vector position to which npc must look</poem>| example= The following code makes to look at player with ID 0. <source lang="lua"> LookAtPos(GetPlayerPos(0))</source>| relfuncs=*LookAtPlayer| retvals=true on success and false on failure (npc not spawned or npc is in vehicle.| }}")
  • 10:10, 23 October 2024V1 8 beta4 release notes (hist | edit) ‎[3,122 bytes]Habi (talk | contribs) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #ffd789; padding: 1em;"> '''Version 1.8 beta 4''' Release date : 24.October.2024 </poem> *Fixed Vehicle Driver not reset(GetVehicleDriver) when a player as driver exit the vehicle. *Added function FireBullet reenabling npc to shoot things. *API is now 1.8 *Fixed npc not able to get into vehicle as driver when player is inside vehicle as passenger. *Fixed npc not closing doors after exiting vehicle. *Npcclient can...")
  • 01:06, 13 October 2024OnStoreDownloadComplete (hist | edit) ‎[632 bytes]Habi (talk | contribs) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;"> This function was added in v1.8 beta 4 and will not work on previous versions. </poem> {{Welcome|desc=This function is called after OnNPCConnect when *npc finishes downloading necessary store files *all store-files were already up to date *npc was not called with options to download store| params=<source>NoParams</source>| example=<source lang=lua> function OnStoreDownloadComplete() { p...")
  • 00:57, 13 October 2024IsStoreDownloading (hist | edit) ‎[485 bytes]Habi (talk | contribs) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;"> This function was added in v1.8 beta 4 and will not work on previous versions. </poem> {{Welcome|desc=Tells if a store download is in progress.| params=<source>NoParams</source>| retvals=true, if a store download is in progress. false, if it has completed or not started. Also null, if npc was not called with options to download store.| relfuncs= *OnStoreDownloadComplete *GetStoreLoc...")
  • 00:51, 13 October 2024GetStoreURL (hist | edit) ‎[721 bytes]Habi (talk | contribs) (Created page with "{{Welcome|desc=Gets the URL of the store contents of server, if server has configured for http-downloads.| params=<source>NoParams</source| example=<source> function OnNPCConnect(id) { print(GetStoreURL()); }</source> Output: <source inline>http://18.132.205.100/store/</source> retvals=Returns the Store-URL configured by server. Returns empty string if server has not configured http-downloads. For rel006, rel004 servers, it always returns empty string.| relfuncs= *GetS...")
  • 00:29, 13 October 2024GetStoreLocation (hist | edit) ‎[905 bytes]Habi (talk | contribs) (Created page with ".") originally created as "GetStoreURL"
  • 06:12, 8 October 2024OnBulletFired (hist | edit) ‎[781 bytes]Habi (talk | contribs) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;"> This function was added in v1.8 beta 4 and will not work in previous versions. </poem> <poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;"> This function is exclusive for 0.4.7.1 and will not work with previous server versions like rel006 or rel004. </poem> {{Welcome|desc=This function is called when a player (or another npc) fires a bullet with weapon.| param...")
  • 04:28, 8 October 2024FireBullet (hist | edit) ‎[1,314 bytes]Habi (talk | contribs) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;"> This function was added in v1.8 beta 4 and will not work in previous versions. </poem> {{Welcome| desc=This will send a bullet-fired packet to server.| params=<syntaxhighlight lang="lua">( weaponid, posx, posy, posz)</syntaxhighlight> <poem>::weaponid: The ID of the weapon whose bullet is fired ::posx : The x co-ordinate of bullet-origin position ::posy : The y co-ordinate of bullet-origin...")
  • 07:03, 1 October 2024InPoly (hist | edit) ‎[847 bytes]Habi (talk | contribs) (Created page with "{{Welcome| desc=Checks if a point is inside a polygon defined by multiple vertices.| params=<syntaxhighlight lang="lua">(px, py, x1, y1, x2, y2, ...)</syntaxhighlight> <poem>::px, py: The coordinates of the point to be checked. ::x1, y1: The coordinates of the first vertex of the polygon. ::x2, y2: The coordinates of the second vertex of the polygon. ::...: The coordinates of subsequent vertices of the polygon.</poem>| retvals=Returns `true` if the point is inside the po...")
  • 05:05, 6 September 2024AmISpawned (hist | edit) ‎[420 bytes]Habi (talk | contribs) (Created page with "{{Welcome| desc=This function checks whether the npc is currently spawned.| params=NoParams| example=<source lang="lua"> function OnPlayerText(playerid, message) { if(message== "John") { if(AmISpawned()) { SendChat("Yes dear."); } else { SendChat("I'm not spawned lilly"); } } } </source>| relfuncs=*RequestSpawn| retvals=Returns true if the npc is spawned, false otherwise.| }}")
  • 04:59, 6 September 2024LookAtPlayer (hist | edit) ‎[680 bytes]Habi (talk | contribs) (Created page with "{{Welcome| desc=The function sets the angle of the npc to that of the specified player, making the npc face the player.| params=<syntaxhighlight lang="lua">(playerid)</syntaxhighlight> <poem>::playerid : The ID of the player the npc will face.</poem>| example=<source lang="lua"> function OnPlayerText(playerid, message) { if(message=="lookAtMe") { if(GetDistanceFromMeToPoint(GetPlayerPos(playerid))<100.0) { LookAtPlayer(playerid); } } } </source>| relfuncs=*...")
  • 04:39, 6 September 2024GetMyHealth (hist | edit) ‎[851 bytes]Habi (talk | contribs) (Created page with "{{Welcome| desc=This function returns the current health of the npc as an integer.| params=<syntaxhighlight lang="lua"> ()</syntaxhighlight> <poem>::NoParams</poem>| example= <poem> Possible implementation: The following npc uses a timer and send chat 'i need medic' when it's health goes down to 25. </poem> <source lang="lua"> timerid<-null; function OnNPCSpawn() { if(!timerid) //precaution for double timers { SetTimer("CheckHealth",10000,1); } } function Check...")
  • 04:27, 6 September 2024SetMyHealth (hist | edit) ‎[891 bytes]Habi (talk | contribs) (Created page with "{{Welcome| desc=This function sets the npc's health to the specified value. If the health is set to 0, the npc will commit suicide.| params=<syntaxhighlight lang="lua"> (newHealth)</syntaxhighlight> <poem>::newHealth : An integer value representing the new health level to set.</poem>| example=<source lang="lua"> The following code possibly decrease npc's health by 5 when 'a player goes near it and says "boo" '. The npc also sends chat 'poor me' after decreasing health. f...")
  • 04:05, 6 September 2024Suicide (hist | edit) ‎[429 bytes]127.0.0.1 (talk) (Created page with "{{Welcome| desc=This function kills the npc.| params=<syntaxhighlight lang="lua"> NoParams</syntaxhighlight> <poem></poem>| example= The following npc commits suicide if some one textes 'loser' to it. <source lang="lua"> function OnPlayerText(playerid, message) { if(message=="loser") { Suicide() } }</source>| relfuncs=*SetMyHealth *RequestClassAbs| returns=* true on success and false on failure (npc not spawned)| }}")
  • 08:06, 15 August 2024Recupdate history (hist | edit) ‎[1,244 bytes]127.0.0.1 (talk) (Created page with "==History== <poem> v4 ONFOOT sync data new fields -> uint8_t byteAction, uint8_t byteReserved INCAR sync data -> no change v3 ONFOOT -> no change INCAR ->uin16_t wAmmo v2 ONFOOT -> uint8_t bIsReloading, uint16_t wAmmo INCAR -> no change v1 ONFOOT and INCAR was as below: </poem> <source> typedef struct _ONFOOT_SYNC_DATA_V1 { uint32_t dwKeys; VECTOR vecPos; float fAngle; uint8_t byteHealth; uint8_t byteArmour; uint8_t byteCurrentWeapon; bool IsCrouching; VECTOR...")
  • 17:20, 14 August 2024V1 8 beta3 release notes (hist | edit) ‎[2,644 bytes]127.0.0.1 (talk) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #ffd789; padding: 1em;"> '''Version 1.8 beta 2''' Release date : Not yet released </poem> ==MAJOR CHANGES== *This release is exclusive for 0.4.7 servers *Rec files need to be upgraded to v6 using recupdate. REL004 users and REL006 users as well '''DO NOT''' update their rec files at the moment. This is because npcclient expects v6 rec files as meant for 0.4.7") originally created as "V1 8 beta2 release notes"