Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new pShot[MAX_PLAYERS], pShotTime[MAX_PLAYERS];
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- if (weaponid < 22 || weaponid > 38) return 0;
- new gt = gettime(), gtc = GetTickCount(), s, Float:pPos[7], w[3];
- GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
- if(!(-20000.0 <= pPos[2] <= 20000.0)) return 0;
- if(hittype != BULLET_HIT_TYPE_NONE) //
- {
- if(!(-1000.0 <= fX <= 1000.0) || !(-1000.0 <= fY <= 1000.0) || !(-1000.0 <= fZ <= 1000.0)) // ANTI BULLET CRASHER
- {
- SendClientMessage(playerid, 0xd36e4aFF, "[kick] Jūs išmestas iš serverio už neleistinų programų naudojimą.);
- SendClientMessage(playerid, 0xffffffff, "Atsiprašome jeigu buvote išmestas per klaidą.");
- Kick(playerid);
- return 0;
- }
- }
- if(weaponid != 38)
- {
- if((gt - pShotTime[playerid]) < 1)
- {
- pShot[playerid]++;
- }
- else
- {
- pShot[playerid] = 0;
- }
- switch(weaponid)
- {
- case 28, 29, 32: s = 17;
- case 30, 31: s = 13;
- default: s = 11;
- }
- if(pShot[playerid] > s) // ANTI RAPID FIRE
- {
- SendClientMessage(playerid, 0xd36e4aFF, "[kick] Jūs išmestas iš serverio už neleistinų programų naudojimą.");
- SendClientMessage(playerid, 0xffffffff, "Atsiprašome jeigu buvote išmestas per klaidą.");
- Kick(playerid);
- return 0;
- }
- pShotTime[playerid] = gt;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement