Help with Minigun Antihack - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Minigun Antihack (
/showthread.php?tid=255790)
Help with Minigun Antihack -
Panormitis - 17.05.2011
Guys i need a code that when someone spawn a minigun with hack program wil not spawn the gun and will say "don't try to hack" any help?
Re: Help with Minigun Antihack -
cessil - 17.05.2011
you can improve on this
pawn Код:
OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid) == 38)
{
SendClientMessage(playerid,0xFFFFFFFF,"OMG PLZ NO CHITTING MINIGUNZ");
ResetPlayerWeapons(playerid);
}
}
Re: Help with Minigun Antihack -
Panormitis - 17.05.2011
Quote:
Originally Posted by cessil
you can improve on this
pawn Код:
OnPlayerUpdate(playerid) { if(GetPlayerWeapon(playerid) == 38) { SendClientMessage(playerid,0xFFFFFFFF,"OMG PLZ NO CHITTING MINIGUNZ"); ResetPlayerWeapons(playerid); } }
|
if i put this on gamemode, will this work when someone spawn it from hack program?
Re: Help with Minigun Antihack -
Naruto_Emilio - 17.05.2011
pawn Код:
OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid) == 38)
{
SendClientMessage(playerid,0xFFFFFFFF,"JunkBuster: You have been banned for Minigum Cheating");
Ban(playerid);
}
}
Re: Help with Minigun Antihack -
sim_sima - 17.05.2011
Use a timer in stead of OnPlayerUpdate,
and use GetPlayerWeaponData in stead of GetPlayerWeapon.
Re: Help with Minigun Antihack -
cessil - 17.05.2011
and learn how to script instead of getting other peoples and copy + pasting it all
Re: Help with Minigun Antihack -
sim_sima - 17.05.2011
Quote:
Originally Posted by cessil
and learn how to script instead of getting other peoples and copy + pasting it all
|
Yea, but he need to learn how to script, and asking is the best way to learn. Thats how i learned a lot of scripting - here.
Re: Help with Minigun Antihack -
cessil - 17.05.2011
right, but if he doesn't understand what a function does and pastes it in anyway then how is he learning?
Re: Help with Minigun Antihack -
sim_sima - 17.05.2011
Quote:
Originally Posted by cessil
right, but if he doesn't understand what a function does and pastes it in anyway then how is he learning?
|
Yea, but that must be his problem
Respuesta: Help with Minigun Antihack -
Lunnatiicz - 17.05.2011
You can create a zone with incognito plugin and do this.
pawn Код:
if (IsPlayerInDynamicArea(playerid, Zone) && GetPlayerWeapon(playerid) > 0))
{
SendClientMessage(playerid, COLOR, "You can't use arms in this zone");
SetPlayerArmedWeapon(playerid, 0);
}
return 1;
}
Or good, use only this.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid) == 38)
{
SendClientMessage(playerid, COLOR, "U can't use this arm :B lol");
}
}
return 1;
}