Scripting/Server/Functions/DestroyNPC
Removes an NPC.
Syntax
DestroyNPC(npc)Arguments
- any npc
Returns
bool
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "destroynpc" )
{
local result = DestroyNPC( 0 );
MessagePlayer( "DestroyNPC returned: " + result, player );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- CreateVehicle
- CreateObject
- CreatePickup
- CreateWeaponPickup
- CreateSphere
- CreateClientSphere
- CreateCheckpoint
- CreateClientCheckpoint
- FindCheckpoint
- GetCheckpointCount
- CreateBlip
- CreateClientBlip
Section: Creating world entities
Categories: Server functions | Creating world entities