← Scripts y librerías
itsneufox/NPC-bare-test-omp-gamemode
Gamemode i created while doing documentation for NPC component
Gamemode★ 4actualizado dic 2025Sin licenciaPawn
Abrir en GitHubEste repositorio no tiene archivo de licencia. Se puede leer, pero eso por sí solo no da permiso para reutilizarlo.
README.md
Commands
HELP & UTILITY
/help- Open the in-game dialog that lists every debug command./countnpcs- Count all NPCs currently created on the server (testsNPC_GetAll).
NPC LIFECYCLE
/createnpc- Create and spawn an armed NPC near you (testsNPC_Create,NPC_Spawn,NPC_SetPos,NPC_SetWeapon,NPC_SetAmmo)./createunarmednpc- Spawn an unarmed NPC at your position (testsNPC_Create,NPC_Spawn,NPC_SetPos)./destroynpc- Destroy your tracked NPC and free it (testsNPC_Destroy)./respawnnpc- Respawn your tracked NPC without recreating it (testsNPC_Respawn)./claimnpc [npcid]- Take control of an existing NPC by ID for debugging (testsNPC_IsValid)./npckill- Instantly kill your tracked NPC (testsNPC_Kill).
NPC MOVEMENT
/npcmove- Send the NPC to your current location usingNPC_Move./npcmovetoplayer- Make the NPC follow you withNPC_MoveToPlayer./startpatrol- Start moving along the currently assigned patrol path (testsNPC_MoveByPath).
NPC COMBAT
/aim- Aim the NPC at your position without firing (testsNPC_AimAt)./aimfire- Aim and fire at your position (testsNPC_AimAtwith firing enabled)./hostile- Make the NPC aggressively target you (testsNPC_AimAtPlayerwith firing)./guard- Have the NPC aim at you without firing (testsNPC_AimAtPlayerwithout firing)./friendly- Stop the NPC from aiming (testsNPC_StopAim)./npcshoot [playerid]- Make NPC shoot at specified player (testsNPC_Shoot)./npcstopmelee- Stop NPC melee attack (testsNPC_StopMeleeAttack)./npcstopmove- Stop NPC movement (testsNPC_StopMove).
NPC ANIMATION
/applydance- Apply a dance animation for 25 seconds (testsNPC_ApplyAnimation,NPC_ClearAnimations)./setdance- Set an animation directly by ID for 25 seconds (testsNPC_SetAnimation,NPC_ClearAnimations)./getanim- Inspect the NPC's current animation data (testsNPC_GetAnimation)./resetanim- Clear the current animation (testsNPC_ResetAnimation).
NPC SETTINGS
/toggleinfiniteammo- Toggle infinite ammo on the NPC (testsNPC_IsInfiniteAmmoEnabled,NPC_EnableInfiniteAmmo)./togglereload- Toggle whether the NPC reloads (testsNPC_IsReloadEnabled,NPC_EnableReloading)./toggleinvulnerable- Toggle NPC invulnerability (testsNPC_IsInvulnerable,NPC_SetInvulnerable)./setkeys [keys] [updown] [leftright]- Set NPC key states (testsNPC_SetKeys)./setweapon [id]- Set NPC weapon (testsNPC_SetWeapon)./setammo [amount]- Set NPC total ammo (testsNPC_SetAmmo)./setammoclip [amount]- Set NPC clip ammo (testsNPC_SetClipAmmo)./sethealth [amount]- Set NPC health (testsNPC_SetHealth)./setarmour [amount]- Set NPC armour (testsNPC_SetArmour)./setfacingangle [angle]- Set NPC facing angle (testsNPC_SetFacingAngle)./setposhere- Teleport NPC to your position (testsNPC_SetPos)./randomrot- Randomize NPC rotation (testsNPC_SetRot)./setanim [id]- Set NPC animation by ID (testsNPC_SetAnimation)./setspecialaction [id]- Set NPC special action (testsNPC_SetSpecialAction)./setfightingstyle [id]- Set NPC fighting style (testsNPC_SetFightingStyle)./setskin [id]- Set NPC skin (testsNPC_SetSkin)./setvelocity [x] [y] [z]- Set NPC velocity (testsNPC_SetVelocity)./setinterior [id]- Set NPC interior (testsNPC_SetInterior)./setvirtualworld [id]- Set NPC virtual world (testsNPC_SetVirtualWorld)./setweaponaccuracy [accuracy]- Set NPC weapon accuracy (testsNPC_SetWeaponAccuracy)./setweaponclipsize [size]- Set NPC weapon clip size (testsNPC_SetWeaponClipSize)./setweaponreloadtime [ms]- Set NPC weapon reload time (testsNPC_SetWeaponReloadTime)./setweaponskill [type] [level]- Set NPC weapon skill level (testsNPC_SetWeaponSkillLevel)./setweaponshoottime [ms]- Set NPC weapon shoot time (testsNPC_SetWeaponShootTime)./setweaponstate [state]- Set NPC weapon state (testsNPC_SetWeaponState).
PATH MANAGEMENT
/createpatrol- Create a new patrol path for your NPC (testsNPC_CreatePath)./clearpatrol- Remove every point from the current patrol path (testsNPC_ClearPath,NPC_GetPathPointCount)./deletepatrol- Destroy the current patrol path entirely (testsNPC_DestroyPath,NPC_IsValidPath)./addpatrolpos- Append your position to the patrol path (testsNPC_AddPointToPath)./removepatrolpoint [index]- Remove a patrol point by index (testsNPC_RemovePointFromPath,NPC_GetPathPointCount).
NODE MANAGEMENT
/npcopennode [id]- Open an NPC navigation node for playback (testsNPC_OpenNode)./npcplaynode [id]- Start following a node path (testsNPC_PlayNode)./npcpausenode- Pause the current node playback (testsNPC_PausePlayingNode)./npcresumenode- Resume a paused node playback (testsNPC_ResumePlayingNode)./npcsetnodepoint [nodeid] [pointid]- Set node to a specific point (testsNPC_SetNodePoint)./npcstopnode- Stop NPC node playback (testsNPC_StopPlayingNode)./npcclosenode [nodeid]- Close a navigation node (testsNPC_CloseNode)./npcchangenode [nodeid] [linkid]- Change NPC to different node via link (testsNPC_ChangeNode)./npcupdatenodepoint [nodeid] [pointid]- Update node point position to player's position (testsNPC_UpdateNodePoint).
VEHICLE COMMANDS
/npcenterbike [seat]- Order the NPC into your debug motorcycle (testsNPC_EnterVehicle)./npcentercar [seat]- Order the NPC into your debug car (testsNPC_EnterVehicle)./npcentertrain [seat]- Order the NPC into your debug train (testsNPC_EnterVehicle)./npcenterhydra [seat]- Order the NPC into your debug hydra (testsNPC_EnterVehicle)./npcexit- Force the NPC to exit its current vehicle (testsNPC_ExitVehicle)./npcputinvehicle- Place the NPC into your current vehicle at passenger seat 1 (testsNPC_PutInVehicle)./npcremovefromvehicle- Remove NPC from vehicle (testsNPC_RemoveFromVehicle)./setvehiclegearstate [state]- Set NPC vehicle gear state (testsNPC_SetVehicleGearState)./setvehiclehealth [health]- Set NPC vehicle health (testsNPC_SetVehicleHealth)./sethydrathrusters [direction]- Set hydra thrusters direction (testsNPC_SetVehicleHydraThrusters)./settrainspeed [speed]- Set train speed (testsNPC_SetVehicleTrainSpeed)./npcusesiren [use]- Use vehicle siren (testsNPC_UseVehicleSiren).
SURFING COMMANDS
/resetsurfing- Clear any surfing data on the NPC (testsNPC_ResetSurfingData)./setsurfingobject [id]- Set NPC surfing object (testsNPC_SetSurfingObject)./setsurfingoffset [x] [y] [z]- Set NPC surfing offsets (testsNPC_SetSurfingOffsets)./setsurfingplayerobject [id]- Set NPC surfing player object (testsNPC_SetSurfingPlayerObject)./setsurfingvehicle [id]- Set NPC surfing vehicle (testsNPC_SetSurfingVehicle)./createobject- Create object with model 1271 for surfing tests (testsCreateObject).
CHECK COMMANDS - NPC STATE
/checkdead- Report whether the NPC is dead (NPC_IsDead)./checkspawned- Report whether the NPC is spawned (NPC_IsSpawned)./checkvalid- Report whether the NPC ID is valid (NPC_IsValid)./checkstreamedin- Show if the NPC is streamed in for you (NPC_IsStreamedIn)./checkanystreamedin- Show if any NPCs are streamed in for you (NPC_IsAnyStreamedIn)./checkmoving- Report if the NPC is currently moving (NPC_IsMoving)./checkmovingtowardme- Report if the NPC is moving toward you (NPC_IsMovingToPlayer)./checkaiming- Report if the NPC is aiming (NPC_IsAiming)./checkaimingat- Report if the NPC is aiming at you (NPC_IsAimingAtPlayer)./checkshooting- Report if the NPC is shooting (NPC_IsShooting)./checkmeleeattacking- Report if the NPC is melee attacking (NPC_IsMeleeAttacking)./checkinvulnerable- Report if the NPC is invulnerable (NPC_IsInvulnerable).
CHECK COMMANDS - NPC STATS
/checkhealth- Show the NPC's health (NPC_GetHealth)./checkarmour- Show the NPC's armour (NPC_GetArmour)./checkammo- Show total ammo for the current weapon (NPC_GetAmmo)./checkclip- Show clip ammo for the current weapon (NPC_GetClipAmmo)./checkpos- Show the NPC's coordinates (NPC_GetPos)./checkposmovingto- Show the NPC's target position when moving (NPC_GetPosMovingTo)./checkfacingangle- Show the NPC's facing angle (NPC_GetFacingAngle)./checkrot- Show the NPC's rotation (NPC_GetRot)./checkvelocity- Show the NPC's velocity (NPC_GetVelocity)./checkvirtualworld- Show the NPC's virtual world (NPC_GetVirtualWorld)./checkinterior- Show the NPC's interior ID (NPC_GetInterior)./checkkeys- Show the NPC's key states (NPC_GetKeys)./checkskin- Show the NPC's skin (NPC_GetSkin)./checkcustomskin- Show the NPC's custom skin ID (NPC_GetCustomSkin)./checkfightingstyle- Show the NPC's fighting style (NPC_GetFightingStyle)./checkspecialaction- Show the NPC's special action (NPC_GetSpecialAction)./checkinfiniteammo- Show if infinite ammo is enabled (NPC_IsInfiniteAmmoEnabled)./checkreloadenabled- Show if reloading is enabled (NPC_IsReloadEnabled)./checkreloading- Show if the NPC is actively reloading (NPC_IsReloading)./checksurfingobject- Show the object the NPC is surfing (NPC_GetSurfingObject)./checksurfingplayerobject- Show the player object the NPC is surfing (NPC_GetSurfingPlayerObject)./checksurfingvehicle- Show the vehicle the NPC is surfing (NPC_GetSurfingVehicle)./checksurfingoffset- Show the NPC's surfing offsets (NPC_GetSurfingOffsets).
CHECK COMMANDS - WEAPON
/checkweapon- Show the NPC's current weapon ID (NPC_GetWeapon)./checkweaponstate- Show the NPC's weapon state with descriptive name (NPC_GetWeaponState)./checkweaponshoottime- Show the shoot time for the current weapon (NPC_GetWeaponShootTime)./checkweaponaccuracy- Show the weapon accuracy value (NPC_GetWeaponAccuracy)./checkweaponclipsize- Show the scripted clip size (NPC_GetWeaponClipSize)./checkweaponactualclipsize- Show the actual clip size (NPC_GetWeaponActualClipSize)./checkweaponreloadtime- Show the scripted reload time (NPC_GetWeaponReloadTime)./checkweaponactualreloadtime- Show the actual reload time (NPC_GetWeaponActualReloadTime)./checkweaponskill- Show all weapon skill levels (NPC_GetWeaponSkillLevel)./checkwhonpcaiming- Show which player the NPC is aiming at (NPC_GetPlayerAimingAt)./checkwhonpcmoving- Show which player the NPC is moving to (NPC_GetPlayerMovingTo).
CHECK COMMANDS - VEHICLE
/checkvehicle- Show the vehicle the NPC is in (NPC_GetVehicle)./checkvehicleid- Show the vehicle ID (NPC_GetVehicleID)./checkvehicleseat- Show the seat occupied by the NPC (NPC_GetVehicleSeat)./checkvehicletrainspeed- Show the train speed (NPC_GetVehicleTrainSpeed)./checkvehiclegearstate- Show the landing gear position (NPC_GetVehicleGearState)./checkvehiclehealth- Show the vehicle health (NPC_GetVehicleHealth)./checkvehiclehydra- Show hydra thruster angles (NPC_GetVehicleHydraThrusters)./checkenteringvehicle- Report if the NPC is entering any vehicle (NPC_IsEnteringVehicle)./checksirenused- Report if the NPC is using the vehicle siren (NPC_IsVehicleSirenUsed).
CHECK COMMANDS - ANIMATION
/checkplayingplayback- Report if an animation playback is running (NPC_IsPlayingPlayback)./checkplaybackpaused- Report if the current playback is paused (NPC_IsPlaybackPaused).
CHECK COMMANDS - PATH/NODE
/checkpathcount- Show the number of paths on the server (NPC_GetPathCount)./checkpathpoint- Show the coordinates of the current path point (NPC_GetPathPoint)./checkpathpointcount- Show how many points are in the path (NPC_GetPathPointCount)./checkpathpointinrange [pathid]- Report if a path has points within 50 units of you (NPC_HasPathPointInRange)./checkvalidpath [pathid]- Report if a path ID is valid (NPC_IsValidPath)./checkvalidrecord [recordid]- Report if a playback record is valid (NPC_IsValidRecord)./checkplayingnode- Report if a node playback is active (NPC_IsPlayingNode)./checknodepaused- Report if node playback is paused (NPC_IsNodePlaybackPaused)./checknodeopen- Report if a navigation node is open (NPC_IsNodeOpen)./checknodetype [nodeid]- Get node type (foot/vehicle/boat) (NPC_GetNodeType)./checknodepointpos [nodeid] [pointid]- Get specific node point position (NPC_GetNodePointPosition)./checknodepointcount [nodeid]- Get node point count (NPC_GetNodePointCount)./checknodeinfo [nodeid]- Get comprehensive node info including type and point count (NPC_GetNodeInfo).
MISC COMMANDS
/checkenterveh- Start chat updates about the vehicle your NPC is entering./stopcheckenterveh- Stop chat updates from/checkenterveh./npcloadrecord [filepath]- Load a playback record from disk (NPC_LoadRecord)./npcmeleeattack [duration]- Trigger a melee attack for the given millisecond (NPC_MeleeAttack)./startplayback [name]- Start playback by name (NPC_StartPlayback)./startplaybackex [recordid]- Start playback by record ID (NPC_StartPlaybackEx)./stopplayback- Stop current playback (NPC_StopPlayback)./pauseplayback- Pause or resume current playback (NPC_PausePlayback)./checkrecordcount- Get count of loaded records (NPC_GetRecordCount)./npcunloadrecord [recordid]- Unload specific record (NPC_UnloadRecord)./npcunloadallrecords- Unload all records (NPC_UnloadAllRecords).
Screenshots
Motorcycle and car location
Train location
Esta página se genera con lo que GitHub publica sobre el repositorio. samp.directory no aloja el código. Informar de un problema con esta ficha