Anti Bulletcrasher 0.3.7 Help
#1

https://www.youtube.com/watch?v=68pn2o5DXpY

It has crashed my server, I need help
Reply
#2

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype != BULLET_HIT_TYPE_NONE)
    {
        if(!( -
1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0))
        {
            new 
name[24], str[128], ipadr[16], year,month,day,hour,minuite,second;
            
GetPlayerName(playerid,name,24);
            
format(str128"%s (ID: %d) has been kicked, reason: Bullet Crasher (type 1)",nameplayerid);
            
SendClientMessageToAll(-1,str);//SendServerMessage(str);
            
gettime(hour,minuite,second);
            
getdate(year,month,day);
            
format(str128"* {FF0000}You have been kicked.");
            
SendClientMessage(playerid, -1str);
            
format(str128"* Admin: Server");
            
SendClientMessage(playerid, -1str);
            
format(str128"* Date: %d/%d/%d",day,month,year);
            
SendClientMessage(playerid, -1str);
            
format(str128"* Time: %02d:%02d",hour,minuite);
            
SendClientMessage(playerid, -1str);
            
format(str128"* Reason: Bullet Crasher");
            
SendClientMessage(playerid, -1str);
            
GetPlayerIp(playeridipadrsizeof(ipadr));
            
format(str128"* IP: {FF0000}%s",ipadr);
            
SendClientMessage(playerid, -1str);
            
Kick(playerid);//SetTimerEx("DelayedKick",250,0,"i",playerid);
            
return 0;
        }
    }
    if(
weaponid != GetPlayerWeapon(playerid))
    {
        new 
name[24], str[128], ipadr[16], year,month,day,hour,minuite,second;
        
GetPlayerName(playerid,name,24);
        
format(str128"%s (ID: %d) has been kicked, reason: Bullet Crasher (type 2)",nameplayerid);
        
SendClientMessageToAll(-1,str);//SendServerMessage(str);
        
gettime(hour,minuite,second);
        
getdate(year,month,day);
        
format(str128"* {FF0000}You have been kicked.");
        
SendClientMessage(playerid, -1str);
        
format(str128"* Admin: Server");
        
SendClientMessage(playerid, -1str);
        
format(str128"* Date: %d/%d/%d",day,month,year);
        
SendClientMessage(playerid, -1str);
        
format(str128"* Time: %02d:%02d",hour,minuite);
        
SendClientMessage(playerid, -1str);
        
format(str128"* Reason: Bullet Crasher");
        
SendClientMessage(playerid, -1str);
        
GetPlayerIp(playeridipadrsizeof(ipadr));
        
format(str128"* IP: {FF0000}%s",ipadr);
        
SendClientMessage(playerid, -1str);
        
Kick(playerid);//SetTimerEx("DelayedKick",250,0,"i",playerid);
    
}
    return 
1;

Reply
#3

Or just try this...

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if((
hittype != BULLET_HIT_TYPE_NONE) && <= weaponid <= WEAPON_MOLTOV) return 0;
    return 
1;

Reply
#4

Quote:
Originally Posted by Matz
Посмотреть сообщение
PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype != BULLET_HIT_TYPE_NONE)
    {
        if(!( -
1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0))
        {
            new 
name[24], str[128], ipadr[16], year,month,day,hour,minuite,second;
            
GetPlayerName(playerid,name,24);
            
format(str128"%s (ID: %d) has been kicked, reason: Bullet Crasher (type 1)",nameplayerid);
            
SendClientMessageToAll(-1,str);//SendServerMessage(str);
            
gettime(hour,minuite,second);
            
getdate(year,month,day);
            
format(str128"* {FF0000}You have been kicked.");
            
SendClientMessage(playerid, -1str);
            
format(str128"* Admin: Server");
            
SendClientMessage(playerid, -1str);
            
format(str128"* Date: %d/%d/%d",day,month,year);
            
SendClientMessage(playerid, -1str);
            
format(str128"* Time: %02d:%02d",hour,minuite);
            
SendClientMessage(playerid, -1str);
            
format(str128"* Reason: Bullet Crasher");
            
SendClientMessage(playerid, -1str);
            
GetPlayerIp(playeridipadrsizeof(ipadr));
            
format(str128"* IP: {FF0000}%s",ipadr);
            
SendClientMessage(playerid, -1str);
            
Kick(playerid);//SetTimerEx("DelayedKick",250,0,"i",playerid);
            
return 0;
        }
    }
    if(
weaponid != GetPlayerWeapon(playerid))
    {
        new 
name[24], str[128], ipadr[16], year,month,day,hour,minuite,second;
        
GetPlayerName(playerid,name,24);
        
format(str128"%s (ID: %d) has been kicked, reason: Bullet Crasher (type 2)",nameplayerid);
        
SendClientMessageToAll(-1,str);//SendServerMessage(str);
        
gettime(hour,minuite,second);
        
getdate(year,month,day);
        
format(str128"* {FF0000}You have been kicked.");
        
SendClientMessage(playerid, -1str);
        
format(str128"* Admin: Server");
        
SendClientMessage(playerid, -1str);
        
format(str128"* Date: %d/%d/%d",day,month,year);
        
SendClientMessage(playerid, -1str);
        
format(str128"* Time: %02d:%02d",hour,minuite);
        
SendClientMessage(playerid, -1str);
        
format(str128"* Reason: Bullet Crasher");
        
SendClientMessage(playerid, -1str);
        
GetPlayerIp(playeridipadrsizeof(ipadr));
        
format(str128"* IP: {FF0000}%s",ipadr);
        
SendClientMessage(playerid, -1str);
        
Kick(playerid);//SetTimerEx("DelayedKick",250,0,"i",playerid);
    
}
    return 
1;

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if((
hittype != BULLET_HIT_TYPE_NONE) && <= weaponid <= WEAPON_MOLTOV) return 0;
    return 
1;

[/QUOTE]

Can I use which one is best for my server?
Reply
#5

Use is:
Quote:

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if((hittype != BULLET_HIT_TYPE_NONE) && 0 <= weaponid <= WEAPON_MOLTOV) return 0;
return 1;
}

Reply
#6

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if((hittype != BULLET_HIT_TYPE_NONE) && 0 <= weaponid <= WEAPON_MOLTOV) return 0;
return 1;
}[/PHP][/QUOTE]

Quote:
Originally Posted by BrianFaria
Посмотреть сообщение
Use is:
Should I use this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)