Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new _global_shotCount[MAX_PLAYERS];
- public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
- {
- if(issuerid == INVALID_PLAYER_ID) return true;
- new
- _local_string[128],
- _local_name_playerid[MAX_PLAYER_NAME],
- _local_name_issuerid[MAX_PLAYER_NAME];
- new
- _local_weaponname[24];
- GetPlayerName(playerid, _local_name_playerid, MAX_PLAYER_NAME);
- GetPlayerName(issuerid, _local_name_issuerid, MAX_PLAYER_NAME);
- GetWeaponName(weaponid, _local_weaponname, sizeof (_local_weaponname));
- if(weaponid == WEAPON_DEAGLE)
- {
- if(_global_shotCount[issuerid] >= 5)
- {
- foreach(Player, i)
- {
- if(p_info[playerid][p_admin] < 1)
- {
- format(_local_string, sizeof(_local_string),
- "Игрок %s[%d] атаковал игрока %s[%d] уже %d раз из %s",
- _local_name_issuerid, issuerid, _local_name_playerid,
- playerid, _global_shotCount[issuerid], _local_weaponname
- );
- SendClientMessage(i, 0xFFFFFFFF, _local_string);
- }
- }
- }
- else _global_shotCount[issuerid]++;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement