Hello I have a question.. (about hotwire mission)
#2

You can toggle the status of a vehicle's engine using SetVehicleParamsEx along with GetVehicleParamsEx.
When creating the hotwire command itself, you can use the random function along with a switch statement to simulate the user succeeding or failing.

pawn Код:
switch(random(2))
{
   case 0: // User has failed or succeeded in hot wiring. [Option 1].
   case 1: // Same situation, content would fall in accordingly. [Option 2].
}
If they succeed, toggle the status of the vehicle's engine to true. (Which would obviously turn it on). You can also use GetPlayerState to determine if they are in a vehicle and in the position of driver.

pawn Код:
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "You aren't the driver of a vehicle.");
Reply


Messages In This Thread
Hello I have a question.. (about hotwire mission) - by Scrillex - 26.09.2012, 22:32
Re: Hello I have a question.. (about hotwire mission) - by West X - 26.09.2012, 22:37
Re: Hello I have a question.. (about hotwire mission) - by Scrillex - 26.09.2012, 22:44

Forum Jump:


Users browsing this thread: 1 Guest(s)