Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new bool:PlayerAttacked[MAX_PLAYERS][MAX_PLAYERS];
- public OnPlayerConnect(playerid) {
- for (new var = 0; var <= GetPlayerPoolSize(); var++) {
- PlayerAttacked[playerid][var] = false;
- PlayerAttacked[var][playerid] = false;
- }
- return true;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) {
- if (issuerid != INVALID_PLAYER_ID)
- PlayerAttacked[issuerid][playerid] = true;
- return true;
- }
- public OnPlayerDeath(playerid, killerid, reason) {
- if (killerid != INVALID_PLAYER_ID) {
- if (!PlayerAttacked[killerid][playerid]) {
- // Ban or w/e
- return true;
- }
- }
- for (new var = 0; var <= GetPlayerPoolSize(); var++)
- PlayerAttacked[var][playerid] = false;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement