Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
- {
- Admin_OnPlayerWeaponShot( playerid, hitid );
- new Float:x, Float:y, Float:z, i = 0;
- new weaponname[24];
- GetPlayerPos(playerid, x, y, z);
- for(; i != sizeof(gSAZones); i++ )
- {
- if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4]) break;
- }
- if( weaponid >= 22 && weaponid != 23 )
- {
- new
- server_tick = GetTickCount();
- if( GetPVarInt( playerid, "Player:ShotTime" ) > server_tick )
- return 0;
- GetWeaponName(weaponid, weaponname, sizeof (weaponname));
- foreach(new j : Player)
- {
- if( !IsLogged( j ) || !Player[j][uRank] ) continue;
- if( Player[j][uMember] != FRACTION_POLICE || Player[j][uLeader] != FRACTION_POLICE ) continue;
- new interior = GetPlayerVirtualWorld( playerid );
- if( interior == 0 )
- {
- format:g_small_string( "** Зафиксирована стрельба в %s из %s!", gSAZones[i][SAZONE_NAME], weaponname );
- }
- else
- {
- for( new d; d < COUNT_ENTERS; d++ )
- {
- format:g_small_string( "** Зафиксирована стрельба в помещении #%s из %s!", interior, weaponname );
- }
- }
- SendClientMessage( j, 0x00BFFFAA, g_small_string );
- }
- clean:<g_small_string>;
- SetPVarInt( playerid, "Player:ShotTime", server_tick + 20000 );
- clean:<g_small_string>;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement