19.12.2010, 14:57
Untested.
Command: (I haven't tested this or the coordinates, I used the coordinates and interior that you provided)
Callback to return the player to their vehicle if/when they try to exit.
Command: (I haven't tested this or the coordinates, I used the coordinates and interior that you provided)
pawn Код:
if(strcmp(cmdtext, "/derby", true) == 0)
{
new
Float: tmp_A;
GetPlayerFacingAngle(playerid, tmp_A);
SetPVarInt(playerid, "d_Car", CreateVehicle(502, -1510.7020, 1014.6202, 1037.8568, tmp_A, -1, -1, -1));
SetPlayerPos(playerid, -1510.7020,1014.6202,1037.8568);
SetPlayerInterior(playerid, 15);
LinkVehicleToInterior(GetPVarInt(playerid, "d_Car"), 15);
PutPlayerInVehicle(playerid, GetPVarInt(playerid, "d_Car"), 0);
return 1;
}
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid) {
if(GetPVarInt(playerid, "d_Car") != 0) PutPlayerInVehicle(playerid, GetPVarInt(playerid, "d_Car"), 0);
return 1;
}