SendChat: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
desc=This function kills the npc.|
desc=This function kills the npc.|
params=<syntaxhighlight lang="lua">
params=<syntaxhighlight lang="lua">
()</syntaxhighlight>
NoParams</syntaxhighlight>
<poem></poem>|
<poem></poem>|
example=
example=
Line 12: Line 12:
{
{
Suicide()
Suicide()
    }
}
}
}</source>|
</source>|
relfuncs=*[[SetMyHealth]]
relfuncs=*[[SetMyHealth]]
*[[RequestClassAbs]]|
*[[RequestClassAbs]]|
returns=* true on success and false on failure (npc not spawned)|
returns=* true on success and false on failure (npc not spawned)|
}}
}}

Revision as of 04:04, 6 September 2024


Description:
This function kills the npc.


Parameters:

NoParams


Return Values:
This function does not return any specific values.


Example The following npc commits suicide if some one textes 'loser' to it.

function OnPlayerText(playerid, message)
{
	if(message=="loser")
	{
	Suicide()
	}
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.