24.07.2017, 09:12
Anti Bulletcrasher 0.3.7 Help
24.07.2017, 10:45
PHP код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float: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(str, 128, "%s (ID: %d) has been kicked, reason: Bullet Crasher (type 1)",name, playerid);
SendClientMessageToAll(-1,str);//SendServerMessage(str);
gettime(hour,minuite,second);
getdate(year,month,day);
format(str, 128, "* {FF0000}You have been kicked.");
SendClientMessage(playerid, -1, str);
format(str, 128, "* Admin: Server");
SendClientMessage(playerid, -1, str);
format(str, 128, "* Date: %d/%d/%d",day,month,year);
SendClientMessage(playerid, -1, str);
format(str, 128, "* Time: %02d:%02d",hour,minuite);
SendClientMessage(playerid, -1, str);
format(str, 128, "* Reason: Bullet Crasher");
SendClientMessage(playerid, -1, str);
GetPlayerIp(playerid, ipadr, sizeof(ipadr));
format(str, 128, "* IP: {FF0000}%s",ipadr);
SendClientMessage(playerid, -1, str);
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(str, 128, "%s (ID: %d) has been kicked, reason: Bullet Crasher (type 2)",name, playerid);
SendClientMessageToAll(-1,str);//SendServerMessage(str);
gettime(hour,minuite,second);
getdate(year,month,day);
format(str, 128, "* {FF0000}You have been kicked.");
SendClientMessage(playerid, -1, str);
format(str, 128, "* Admin: Server");
SendClientMessage(playerid, -1, str);
format(str, 128, "* Date: %d/%d/%d",day,month,year);
SendClientMessage(playerid, -1, str);
format(str, 128, "* Time: %02d:%02d",hour,minuite);
SendClientMessage(playerid, -1, str);
format(str, 128, "* Reason: Bullet Crasher");
SendClientMessage(playerid, -1, str);
GetPlayerIp(playerid, ipadr, sizeof(ipadr));
format(str, 128, "* IP: {FF0000}%s",ipadr);
SendClientMessage(playerid, -1, str);
Kick(playerid);//SetTimerEx("DelayedKick",250,0,"i",playerid);
}
return 1;
}
24.07.2017, 10:47
Or just try this...
PHP код:
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;
}
25.07.2017, 03:45
Quote:
PHP код:
|
PHP код:
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;
}
Can I use which one is best for my server?
25.07.2017, 03:48
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; } |
25.07.2017, 04:24
« Next Oldest | Next Newest »
Users browsing this thread: 3 Guest(s)