11.07.2012, 20:44
Took out part of the callback and added
If you get compile errors tell me and I will attempt to fix them.
pawn Code:
if(!IsPlayerInAnyVehicle(playerid) == 1)){
DestroyVehicleForPlayer(playerid);
pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK ){
if(!IsPlayerInAnyVehicle(playerid) == 1)){
DestroyVehicleForPlayer(playerid);
new Float:x, Float:y, Float:z, vehicle;
GetPlayerPos(playerid, x, y, z );
GetVehicleWithinDistance(playerid, x, y, z, 20.0, vehicle);
if(IsVehicleRc(vehicle)){
PutPlayerInVehicle(playerid, vehicle, 0);
}
}