Author Topic: OnVehicleClicked  (Read 1063 times)

onVehicleClicked >> Player >> Kill
onVehicleClicked >> Client >> CenterPrint >> "<color:FF0000><font:Impact:50>DON'T TOUCH MY loving CAR YOU stuff!!!"

onVehicleClicked >> Player >> Kill
onVehicleClicked >> Client >> CenterPrint >> "<color:FF0000><font:Impact:50>DON'T TOUCH MY loving CAR YOU stuff!!!"
The best alternative to a bait car.

What would you need to change...?
Okay, I am going to tell everyone right now, I suck at wording things. What I meant was:

"I had to change namecheck because it would not work, turns out I left out a capital."


RegisterInputEvent(fxDtsBrick, "onVehicleClicked", "Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame");
package clickVehicle
{
   function Vehicle::OnActivate(%vehicle, %activatingObj, %activatingClient, %pos, %vec)
   {
      Parent::OnActivate(%vehicle, %activatingObj, %activatingClient, %pos, %vec);
      Vehicle::onClick(%obj,%activatingObj,%activatingClient)
      if(!isObject(%obj.spawnBrick))
          return;
      $InputTarget_["Self"] = %obj.spawnBrick;
      $InputTarget_["Player"] = %activatingObj;
      $InputTarget_["Client"] = %activatingClient;
      $InputTarget_["Minigame"] = getMinigameFromObject(%activatingObj);
      %obj.spawnbrick.processInputEvent("onVehicleClicked", %activatingClient);
   }
};
activatepackage(clickVehicle);

You're an amazing coder, but when you don't test stuff you're really prone to silly mistakes. Vehicle::onClick(%obj,%activatingObj,%activatingClient) doesn't have a trailing semicolon, and %obj doesn't exist.

You're an amazing coder, but when you don't test stuff you're really prone to silly mistakes. Vehicle::onClick(%obj,%activatingObj,%activatingClient) doesn't have a trailing semicolon, and %obj doesn't exist.
fixed, Vehicle::onClick doesn't even exist...