lmao, what i meant was, his problem is when a player is shot in a vehicle only hittype 2 is called, so what i was saying is why's that a problem when you can loop on hittype 2 for the driver of hitid (vehicle id) right? like this:
PHP Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
switch(hittype)
{
case 1:
{
if(GetPlayerState(playerid) == 1)
{
//player hit on foot.
}
}
case 2:
{
for(new i, j = GetPlayerPoolSize(); i <= j; i++)
{
if(!IsPlayerConnected(i) || GetPlayerState(i) == 1) continue;
if(GetPlayerVehicleID(i) == hitid && GetPlayerState(i) ==2)
{
//driver of the vehicle that was hit by another player is 'i'
}
if(GetPlayerVehicleID(i) == hitid && GetPlayerState(i) ==3)
{
//passenger of the vehicle shot
}
}
}
}
return 1;
}