#include <a_samp>
forward AntiCheatCheck(playerid);
public AntiCheatCheck(playerid)
{
//anti jetpack
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
SendClientMessage(playerid,0xFFFFFFAA,"Mal si Jetpack ! Server ta zabanoval !");
Ban(playerid);
}
//anti minigun
if(GetPlayerWeapon(playerid) == 38)
{
SendClientMessage(playerid,0xFFFFFFAA,"Mal si Minigun ! Server ta zabanoval !");
Ban(playerid);
}
//anti speed hack
if(GetPlayerSpeed(playerid) > 600)
{
SendClientMessage(playerid,0xFFFFFFAA,"Podozrenie na SpeedHack ! Server ta kickol !");
Kick(playerid);
}
return 1;
}
stock GetPlayerSpeed(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
return floatround(ST[3]);
}
public OnFilterScriptInit()
{
SetTimer("AntiCheatCheck",3000,true);
return 1;
}
if(strcmp(cmdtext, "/Minigun", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health >= 20)
{
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERDELIMA, "Servidor{FFFFFF}: Baja De Tu Vehiculo e Intentalo Nuevamente ");
VariableDeBloqueo[playerid] = 1; //Mini Juego Bloqueo CMD
SetPlayerArmour(playerid,100); //le da 100 de Chaleco
SetPlayerHealth(playerid,100); //le da 100 de Vida
SetPlayerVirtualWorld(playerid, 12);
SetPlayerInterior(playerid, 1);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);
GivePlayerWeapon(playerid, 38, 10000);
GameTextForPlayer(playerid,"~r~>>~b~Bienvenido Minigun~r~<<",2500,1);
new Minigun=random(12);
if (Minigun==0) { SetPlayerPos(playerid,2205.7100,1580.5699,999.9791);}
else if (Minigun==1) { SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);}
else if (Minigun==2) { SetPlayerPos(playerid,2230.8403,1580.6292,999.9669);}
else if (Minigun==3) { SetPlayerPos(playerid,2227.4775,1596.2130,999.9703);}
else if (Minigun==4) { SetPlayerPos(playerid,2224.9924,1613.1871,999.9725);}
else if (Minigun==5) { SetPlayerPos(playerid,2218.0820,1614.4119,999.9827);}
else if (Minigun==6) { SetPlayerPos(playerid,2204.9968,1612.7771,999.9773);}
else if (Minigun==7) { SetPlayerPos(playerid,2193.0413,1613.0560,999.9738);}
else if (Minigun==8) { SetPlayerPos(playerid,2176.7170,1624.3013,999.9732);}
else if (Minigun==9) { SetPlayerPos(playerid,2176.5144,1601.5717,999.9766);}
else if (Minigun==10) { SetPlayerPos(playerid,2187.5549,1590.9081,999.9796);}
else if (Minigun==11) { SetPlayerPos(playerid,2173.7686,1585.7428,999.9722);}
}
else
{
SendClientMessage(playerid, VERDELIMA, "Server Freeroam{FFFFFF}: Llena tu Vida para usar los TelePorts");
}
return 1;
}
#include <a_samp>
new EnMinigun[MAX_PLAYERS];
forward AntiCheatCheck(playerid);
public AntiCheatCheck(playerid)
{
//anti jetpack
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
SendClientMessage(playerid,0xFFFFFFAA,"Mal si Jetpack ! Server ta zabanoval !");
Ban(playerid);
}
if(GetPlayerWeapon(playerid) == 38)
{
SendClientMessage(playerid,0xFFFFFFAA,"Mal si Minigun ! Server ta zabanoval !");
if(EnMinigun[playerid] == 0)
{
Ban(playerid);
}
}
//anti speed hack
if(GetPlayerSpeed(playerid) > 600)
{
SendClientMessage(playerid,0xFFFFFFAA,"Podozrenie na SpeedHack ! Server ta kickol !");
Kick(playerid);
}
return 1;
}
stock GetPlayerSpeed(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
return floatround(ST[3]);
}
public OnFilterScriptInit()
{
SetTimer("AntiCheatCheck",3000,true);
return 1;
}
if(strcmp(cmdtext, "/Minigun", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health >= 20)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERDELIMA, "Servidor{FFFFFF}: Baja De Tu Vehiculo e Intentalo Nuevamente ");
VariableDeBloqueo[playerid] = 1;
EnMinigun[playerid] = 1;
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
SetPlayerVirtualWorld(playerid, 12);
SetPlayerInterior(playerid, 1);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);
GivePlayerWeapon(playerid, 38, 10000);
GameTextForPlayer(playerid,"~r~>>~b~Bienvenido Minigun~r~<<",2500,1);
switch(random(12))
{
case 0: SetPlayerPos(playerid,2205.7100,1580.5699,999.9791);
case 1: SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);
case 2: SetPlayerPos(playerid,2230.8403,1580.6292,999.9669);
case 3: SetPlayerPos(playerid,2227.4775,1596.2130,999.9703);
case 4: SetPlayerPos(playerid,2224.9924,1613.1871,999.9725);
case 5: SetPlayerPos(playerid,2218.0820,1614.4119,999.9827);
case 6: SetPlayerPos(playerid,2204.9968,1612.7771,999.9773);
case 7: SetPlayerPos(playerid,2193.0413,1613.0560,999.9738);
case 8: SetPlayerPos(playerid,2176.7170,1624.3013,999.9732);
case 9: SetPlayerPos(playerid,2176.5144,1601.5717,999.9766);
case 10: SetPlayerPos(playerid,2187.5549,1590.9081,999.9796);
case 11: SetPlayerPos(playerid,2173.7686,1585.7428,999.9722)
}
}
else
{
SendClientMessage(playerid, VERDELIMA, "Server Freeroam{FFFFFF}: Llena tu Vida para usar los TelePorts");
}
return 1;
}
//AGREGA EN ONPLAYERSPAWN
EnMinigun = 0;
pawn Код:
pawn Код:
|
//AGREGA EN ONPLAYERSPAWN
EnMinigun = 0;
EnMinigun (playerid)= 0;
EnMinigun[playerid]= 0;