Hello Everyone
#1

Hello Everyone

I need your small help how i can make Anti Pickup hack?
hackers use sob to teleport to the pickup and taking that.
Like money bag

Kindly help

Thanks.
Reply
#2

maybe getting player dictansne from point when it set's prickup and making a limit time for that distance will help you buts its hard maybe it will be more easier way xD
Reply
#3

Quote:
Originally Posted by MBilal
Посмотреть сообщение
Hello Everyone

I need your small help how i can make Anti Pickup hack?
hackers use sob to teleport to the pickup and taking that.
Like money bag

Kindly help

Thanks.
1. Do not use callback:

PHP код:
/*
public OnPlayerPickUpPickup(playerid, pickupid) {
     return 1;
}
*/ 
2. Create static pickup type 24 or -1

PHP код:
// Init array of pickups
enum E_PICKUPS {
     
ID,
     
MODEL,
     
Float:XFloat:YFloat:ZFloat:RANGE
}
new 
pickups[MAX_PACKUPS][E_PICKUPS];
// Create pickups
pickups[0][ID] = CreatePickup(model240.00.02.00);
// pickups[1][ID] = CreatePickup ...
// etc.. 
3. Cheak player pos on callback:
PHP код:
public OnPlayerUpdate(playerid) {
    for (new 
iMAX_PICKUPSi++) {
         if (
IsPlayerInRangeOfPoint(playeridpickups[i][RANGE], pickups[i][X], pickups[i][Y], pickups[i][Z])) {
               
DestroyPickup(pickups[i][ID]);
               
pickups[i][ID] = -1;
               
// Give item
         
}
    }
    return 
1;

Successful game design.
Reply
#4

Quote:
Originally Posted by Logofero
Посмотреть сообщение
1. Do not use callback:

3. Cheak player pos on callback:
PHP код:
public OnPlayerUpdate(playerid) {
    for (new 
iMAX_PICKUPSi++) {
         if (
IsPlayerInRangeOfPoint(playeridpickups[i][RANGE], pickups[i][X], pickups[i][Y], pickups[i][Z])) {
               
DestroyPickup(pickups[i][ID]);
               
pickups[i][ID] = -1;
               
// Give item
         
}
    }
    return 
1;

Successful game design.
1 Question Using that on OnPlayerConnect won't lag the game?
Reply
#5

Quote:
Originally Posted by Humza
Посмотреть сообщение
1 Question Using that on OnPlayerConnect won't lag the game?
You can add a check for those who have not yet entered the game. Then, the lag will be.

Example:

PHP код:
enum {
   
// OTHERS VARS...
   
GAMESTATE
}
new 
p_info[MAX_PLAYERS][E_P_INFO];
public 
OnPlayerSpawn(playerid) {
    
p_info[playerid][GAMESTATE] = 1;
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason) {
    
p_info[playerid][GAMESTATE] = 0;
    return 
1;
}
public 
OnPlayerUpdate(playerid) {
    if (!
p_info[playerid][GAMESTATE]) return 1// Anti lag for connecting player
    
for (new iMAX_PICKUPSi++) {
         if (
IsPlayerInRangeOfPoint(playeridpickups[i][RANGE], pickups[i][X], pickups[i][Y], pickups[i][Z])) {
               
DestroyPickup(pickups[i][ID]);
               
pickups[i][ID] = -1;
               
// Give item
         
}
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)