ANTI-CHEAT (GetPlayerVirtualWorld) - 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: ANTI-CHEAT (GetPlayerVirtualWorld) (
/showthread.php?tid=177510)
ANTI-CHEAT (GetPlayerVirtualWorld) -
Libra_PL - 18.09.2010
Well, I'm making a minigame with miniguns, but the anti-cheat would ban them for having that. I tried to add one thing (with GetPlayerVirtualWorld), but I had errors. The minigame is at virtual world 4 and 15. So, can you help me and allow the minigun on these virtual worlds?
Script of that:
Код:
#if defined ANTI_MINIGUN
new weap, ammo;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][Level] == 0)
{
GetPlayerWeaponData(i, 7, weap, ammo);
if(ammo > 1 && weap == 38) {
new string[128]; format(string,sizeof(string),"ANTICHEAT: %s has been automatically banned for spawning Minigun with %d ammo", PlayerName2(i), ammo);
SendClientMessageToAll(red,string);
Ban(i);
}
}
}
#endif
Re: ANTI-CHEAT (GetPlayerVirtualWorld) -
FireCat - 18.09.2010
well there is a tutorial when you teleport to a dm place it sets dmplace = 1 then on your anticheat put
if dmplace = 1 then return 0
else ban(i)
btw hi libra
Re: ANTI-CHEAT (GetPlayerVirtualWorld) -
Libra_PL - 18.09.2010
Hey.
But there's no only one DM place (minigame), there's over 20 (with Rocket Lanuchers and other).
Re: ANTI-CHEAT (GetPlayerVirtualWorld) -
FireCat - 18.09.2010
well still you can use it
figure it out xD
here
https://sampforum.blast.hk/showthread.php?tid=176688
Re: ANTI-CHEAT (GetPlayerVirtualWorld) -
Dime - 18.09.2010
try somethin like this..
Quote:
#if defined ANTI_MINIGUN
new weap, ammo;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][Level] == 0)
{
if(IsPlayerInMiniGame[playerid] == 1) return//
GetPlayerWeaponData(i, 7, weap, ammo);
if(ammo > 1 && weap == 3 {
if
new string[128]; format(string,sizeof(string),"ANTICHEAT: %s has been automatically banned for spawning Minigun with %d ammo", PlayerName2(i), ammo);
SendClientMessageToAll(red,string);
Ban(i);
}
}
}
#endif
|
Re: ANTI-CHEAT (GetPlayerVirtualWorld) -
Libra_PL - 18.09.2010
Well, it cannot be IsPlayerInMiniGame, because there are some places (like 24/7 shops), when you enter, your virtual world changing...
Re: ANTI-CHEAT (GetPlayerVirtualWorld) -
Dime - 18.09.2010
That IsPlayerInMiniGame i use..dont know what you do
Re: ANTI-CHEAT (GetPlayerVirtualWorld) -
Libra_PL - 18.09.2010
just something like
if(GetPlayerVirtualWorld(i) < 8 || > 14) return
For example
Re: ANTI-CHEAT (GetPlayerVirtualWorld) - [03]Garsino - 18.09.2010
pawn Код:
if(GetPlayerVirtualWorld(playerid) != 4 && GetPlayerVirtualWorld(playerid) != 15)
Re: ANTI-CHEAT (GetPlayerVirtualWorld) -
Libra_PL - 18.09.2010
Ty, Garsino, works.