12.01.2015, 14:10
Hi, friend , I could help or give an idea of how you could do that when a vehicle without a driver and this is a passenger in the passenger lay their weapons with 0 bullets or not generate any damage
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(IsPlayerInAnyVehicle(playerid))
{
new
driver = INVALID_PLAYER_ID,
vehid = GetPlayerVehicleID(playerid);
for(new i; i < GetMaxPlayers(); i++)
{
if(GetPlayerVehicleID(i) == vehid && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
driver = i;
break;
}
}
if(driver == INVALID_PLAYER_ID && GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 0;
}
return 1;
}