22.01.2012, 18:47
like the title says pls post how or just the code what ever you prefer, thx
new LastShot[MAX_PLAYERS] = -1, Shooter[MAX_PLAYERS] = -1;
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) {
LastShot[playerid] = weaponid;
Shooter[playerid] = issuerid;
}
public OnPlayerDeath(playerid, killerid, reason) {
if(LastShot[playerid] != -1 && Shooter[playerid] == killerid) reason = LastShot[playerid];
}
public OnPlayerSpawn(playerid) {
LastShot[playerid] = -1;
Shooter[playerid] = -1
}
public OnPlayerDeath(playerid, killerid, reason) {
reason = GetPlayerWeapon(killerid);
}