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

Hello maybe someone can lead me to the point...

I want to make simple hotwire mission.. With random cars.. How can I do it?
Reply
#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
#3

I wanted it more like onld pen:ls system.. Just what the red mark shows on minimap and you just need to pick up and deliver it to some place... After delivery you get like 10k..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)