Scripting/Server/NPCs/npc.SetCruiseSpeed
Cruise speed while driving (game units, ~10 slow, ~30 fast). Applies at once while DRIVE_TO is active.
Syntax
npc.SetCruiseSpeed(speed)Arguments
- float speed
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "setcruisespeed" )
{
// npc is a npc handle (see NPC members)
npc.SetCruiseSpeed( 5.0 );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: NPC members
Categories: Server functions | NPC members