Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Create the new boolean variable. Docs: http://www.squirrel-lang.org/squirreldoc/reference/language/builtin_functions.html#class.rawnewmember
- CVehicle.rawnewmember("EngineState",false,null,false);
- function CVehicle::KillEngine(){
- //Turn the engine off.
- this.SetHandlingData(13,0);
- //Not sure if it works.
- this.EngineState = false;
- }
- function CVehicle::StartEngine(){
- //Turn the engine on.
- this.SetHandlingData(13,150);
- //Change the variable to true.
- this.EngineState = true;
- }
- function CVehicle::GetEngineState(){ return this.EngineState; }
- /*
- * New functions with their usage:
- 1) vehicle.KillEngine()
- @arg none
- @ret null
- 2) vehice.StartEngine()
- @arg none
- @ret null
- 3) vehicle.GetEngineState()
- @arg none
- @ret bool
- */
- //NOTE: Untested code, might not work.
Add Comment
Please, Sign In to add comment