[Tutorial] Anti-Weapon hack - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+----- Forum: Lançamentos/Releases (
https://sampforum.blast.hk/forumdisplay.php?fid=56)
+----- Thread: [Tutorial] Anti-Weapon hack (
/showthread.php?tid=479131)
Anti-Weapon hack -
ScriptGameS - 03.12.2013
Bom gente,meu 1є tutorial vamos lб
Esse tutorial de hoje irei ensinar a como colocar em seu servidor um anti-xiter de armas
1є Vamos criar uma Forward Chamada AntiHack
PHP код:
forward AntiHack(playerid);
2є Criaremos um SetTimer no OnGameModeInit.
PHP код:
SetTimer("AntiHack", 2000, 1);// Obs: Esse SetTimer Server para verificar se o player puxo alguma arma ilegal
3є Criaremos a Public onde terб o id das armas proibidas !
PHP код:
public AntiHack(playerid)
{
new string[128];
new giveplayer[MAX_PLAYER_NAME];
if(IsPlayerInRangeOfPoint(playerid, 10.0, FogoX[1],FogoY[1],FogoZ[1]))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
{
if(GetPlayerWeapon(i) == 35)// Aqui Serб o ID Da Arma
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "ANTIXITER: %s[%d] pegou alguma arma pelo ****** e foi banido automaticamente!", giveplayer,i);// Aqui a msg q serб exibida
SendClientMessageToAll(COLOR_LIGHTRED, string);
SBan(i, "Puxando Armas Pelo ******", "Automбtico");// Aqui e a parte do ban ai vocк mim pergunta porque vocк nгo usa Ban(i);? a Resposta й porque usando Ban(i); o Player Serб banido e colocado numa pasta chamada samp.ban na host ou seja se for desbanir o player terб q ir na host e usando o Sban Nгo.
}
}
}
return 1;
By:ScriptG
Re: Anti-Weapon hack -
Juniiro3 - 03.12.2013
E se o cara pegar uma arma que nгo for proibida no servidor pelo s0rvete?
Re: Anti-Weapon hack -
ScriptGameS - 03.12.2013
Quote:
Originally Posted by Juniiro3
E se o cara pegar uma arma que nгo for proibida no servidor pelo s0rvete?
|
Boa observaзгo!
Irei refazer e lanзar o v2.0.
Obrigado
Re: Anti-Weapon hack -
mau.tito - 03.12.2013
Vocк nem testou , pq usa um settimer , e na callback usa playerid , e dentro dela usa loop.
Re: Anti-Weapon hack -
Don_Speed - 03.12.2013
Quote:
Originally Posted by ScriptGameS
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, FogoX[1],FogoY[1],FogoZ[1]))
|
Copia de seu GM , pelo menos coloca os creditos de quem fez !
Respuesta: Anti-Weapon hack -
DanDRT - 03.12.2013
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, FogoX[1],FogoY[1],FogoZ[1]))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
{
Parei por aqui.
Re: Anti-Weapon hack -
WLSF - 03.12.2013
Nгo sei se foi vocк mesmo que fez, mas tipo, nгo ficou muito bom...
Tome uma dica, quando vocк for fazer tutoriais, tente explicar melhor oque vocк estб fazendo, e o mais уbvio, tente entender oque vocк tб fazendo tambйm.
Re: Anti-Weapon hack -
Samuel300 - 03.12.2013
Removido
Re: Anti-Weapon hack -
DouglasRodrigues - 03.12.2013
Que negrice foi essa cara?
ctrl+c - ctrl+v dahora.
Re: Anti-Weapon hack -
ScriptGameS - 03.12.2013
Quote:
Originally Posted by DouglasRodrigues
Que negrice foi essa cara?
ctrl+c - ctrl+v dahora.
|
nгo intendi? eu msm fiz esse tuto '-'