SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/11/2019, 02:58 AM   #1
pedrotvr
Huge Clucker
 
Join Date: Nov 2013
Posts: 386
Reputation: 7
Default Anti PedSlotsUsed F5

I found this code to broke that info when player press F5, that info shows how many players have around when u press F5

It is messing the value, when have no players around it is changing 0 from 1, 0,1,0,1

But when there is only one player around it freeze on one

Is anyone know how to break with this?

Its like a hacker for my server -.-

1
pawn Code:
#include     <Pawn.RakNet>
new
    psu_Timer[MAX_PLAYERS],
    psu_View[10][MAX_PLAYERS];

2 (public OnPlayerDisconnect(playerid, reason) {)
pawn Code:
KillTimer(psu_Timer[playerid]);

3 (public OnPlayerSpawn(playerid) {)
pawn Code:
KillTimer(psu_Timer[playerid]);
    psu_Timer[playerid] = SetTimerEx("UpdatePlayerPSU", 500, true, "i", playerid);

4
pawn Code:
forward UpdatePlayerPSU(playerid);
public UpdatePlayerPSU(playerid)
{
    for(new i = 0; i < 10; i++)
    {
        if(!IsPlayerConnected(i))
            continue;
           
        if(!IsPlayerStreamedIn(i, playerid))
        {
            new BitStream:bs = BS_New();
           
            if(random(2) == 1 && psu_View[i][playerid])
            {
                BS_WriteValue(bs, PR_UINT16, i);
                BS_RPC(bs, playerid, 163); // WorldPlayerRemove
                psu_View[i][playerid] = false;
            }
            else if(!psu_View[i][playerid])
            {
                BS_WriteValue(bs,
                    PR_UINT16, i,
                    PR_UINT8, GetPlayerTeam(i),
                    PR_UINT32, GetPlayerSkin(i),
                    PR_FLOAT, 7000.0,
                    PR_FLOAT, 7000.0,
                    PR_FLOAT, 7000.0,
                    PR_FLOAT, 0.0,
                    PR_UINT32, GetPlayerColor(i),
                    PR_UINT8, GetPlayerFightingStyle(i)
                ); // WorldPlayerAdd
               
                BS_RPC(bs, playerid, 32);
                psu_View[i][playerid] = true;
            }
           
            BS_Delete(bs);
        }
    }
    return 1;
}

script found on: https://forum.sa-mp.com/showthread.p...30#post4122830

Last edited by pedrotvr; 25/11/2019 at 07:44 PM.
pedrotvr is offline   Reply With Quote
Old 07/11/2019, 03:23 PM   #2
pedrotvr
Huge Clucker
 
Join Date: Nov 2013
Posts: 386
Reputation: 7
Default Re: Anti PedSlotsUsed F5

bump
pedrotvr is offline   Reply With Quote
Old 08/11/2019, 08:38 PM   #3
foxcovitsch
Little Clucker
 
foxcovitsch's Avatar
 
Join Date: Nov 2019
Posts: 5
Reputation: 0
Default Re: Anti PedSlotsUsed F5

the simpler way to fix that is to just spawn npc randomly under map near the player, easier and not as buggy as screwing around with bit streams and stuff :3
__________________


x


foxcovitsch is offline   Reply With Quote
Old 20/11/2019, 04:08 AM   #4
pedrotvr
Huge Clucker
 
Join Date: Nov 2013
Posts: 386
Reputation: 7
Default Re: Anti PedSlotsUsed F5

but it would broke my robbery npc system, i would have to remake it
and i would lose some slots

there is no way to fix it by Pawn.RakNet?
pedrotvr is offline   Reply With Quote
Old 22/11/2019, 05:23 PM   #5
pedrotvr
Huge Clucker
 
Join Date: Nov 2013
Posts: 386
Reputation: 7
Default Re: Anti PedSlotsUsed F5

bump
pedrotvr is offline   Reply With Quote
Old 25/11/2019, 07:43 PM   #6
pedrotvr
Huge Clucker
 
Join Date: Nov 2013
Posts: 386
Reputation: 7
Default Re: Anti PedSlotsUsed F5

bump
pedrotvr is offline   Reply With Quote
Old 30/11/2019, 12:26 AM   #7
pedrotvr
Huge Clucker
 
Join Date: Nov 2013
Posts: 386
Reputation: 7
Default Re: Anti PedSlotsUsed F5

bump
pedrotvr is offline   Reply With Quote
Old 03/12/2019, 07:50 AM   #8
pedrotvr
Huge Clucker
 
Join Date: Nov 2013
Posts: 386
Reputation: 7
Default Re: Anti PedSlotsUsed F5

bump
pedrotvr is offline   Reply With Quote
Old 05/12/2019, 07:23 PM   #9
pedrotvr
Huge Clucker
 
Join Date: Nov 2013
Posts: 386
Reputation: 7
Default Re: Anti PedSlotsUsed F5

Is anyone ever did it?
This PedSlotsUsed is kinda a hack :@
pedrotvr is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Anti PedSlotsUsed KoloradO Lançamentos/Releases 6 10/01/2020 10:35 AM
[FilterScript] Anti-Cheat ANTIFLY\ANTI GOD\ANTI SKIN BUG\ANTI MONEY HACK\ANTI JETPACK HACK\ANTI GODOFCARS\ANTI FAKEKILL RedMF Lançamentos/Releases 15 19/07/2018 07:29 PM
[Ajuda] Aparecer PedSlotsUsed na tela, ThiagoGamemodes Português/Portuguese 1 31/03/2017 02:49 PM
Request anti cheat, anti flyhack | anti ammo hack | anti healt hack | anti aimboter Izaki Scripting Help 1 15/06/2015 05:21 PM
Anti Flood/Anti Spam/Anti Database Hack CROSS_Hunter Server Support 3 11/09/2012 08:29 AM


All times are GMT. The time now is 10:13 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.