[SUGGESTION]Drive-By Hiding
#1

Hey..

What about a Hiding Passanger back from the Drive By mode? After press Key_Horn backs to normal position in the vehicle. It can be very useful and better than exit/enter car.
Reply
#2

It's possible, detect if player is passenger then use GetPlayerSeat then PutPlayerInVehicle again when you press KEY_HORN.
Reply
#3

Can't you re-press the button that sent you into drive-by mode to do this?
Reply
#4

You can press enter, but then again you can't go into driveby mode again before re-entering the car :P
Reply
#5

Quote:
Originally Posted by case 1337:
Посмотреть сообщение
It's possible, detect if player is passenger then use GetPlayerSeat then PutPlayerInVehicle again when you press KEY_HORN.
A function to get Seat? is.. GetPlayerSeat?
Reply
#6

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
A function to get Seat? is.. GetPlayerSeat?
GetPlayerVehicleSeat, sorry.
Reply
#7

You could always do this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/remove", cmdtext, true, 10) == 0)
    {
        SetPVarInt(playerid, "CurrentVehicle", GetPlayerVehicleID(playerid));
        SetPVarInt(playerid, "CurrentVehSeat", GetPlayerVehicleSeat(playerid));
        RemovePlayerFromVehicle(playerid);
        PutPlayerInVehicle(playerid, GetPVarInt(playerid, "CurrentVehicle"), GetPVarInt(playerid, "CurrentVehSeat"));
        return 1;
    }
    return 0;
}
Reply
#8

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
You could always do this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/remove", cmdtext, true, 10) == 0)
    {
        SetPVarInt(playerid, "CurrentVehicle", GetPlayerVehicleID(playerid));
        SetPVarInt(playerid, "CurrentVehSeat", GetPlayerVehicleSeat(playerid));
        RemovePlayerFromVehicle(playerid);
        PutPlayerInVehicle(playerid, GetPVarInt(playerid, "CurrentVehicle"), GetPVarInt(playerid, "CurrentVehSeat"));
        return 1;
    }
    return 0;
}
Eh.. try to re-Drive By after do that.
Reply
#9

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
You could always do this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/remove", cmdtext, true, 10) == 0)
    {
        SetPVarInt(playerid, "CurrentVehicle", GetPlayerVehicleID(playerid));
        SetPVarInt(playerid, "CurrentVehSeat", GetPlayerVehicleSeat(playerid));
        RemovePlayerFromVehicle(playerid);
        PutPlayerInVehicle(playerid, GetPVarInt(playerid, "CurrentVehicle"), GetPVarInt(playerid, "CurrentVehSeat"));
        return 1;
    }
    return 0;
}
Is it just me, or this is really bad example?
Reply
#10

Quote:
Originally Posted by Sergei
Посмотреть сообщение
Is it just me, or this is really bad example?
It is a bad example. This is a good example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/remove", cmdtext, true, 10) == 0)
    {
        new veh =  GetPlayerVehicleID(playerid);
        new seat = GetPlayerVehicleSeat(playerid);
        new Float:pos[3];
        GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
        SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
        PutPlayerInVehicle(playerid, veh, seat);
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)