Antifall bugs.
#1

Well, in this CMD, it has a problem with AntiFall, when a player teleport to there, they will get back to their vehicle, how to fix it?
AntiFall = "Act[playerid]"

pawn Код:
CMD:hayclimb(playerid,params[])
{
    SetPlayerPos(playerid, -1806.1652832031,531.43103027344,36.003524780273);
    SendClientMessage(playerid, 0x00FF00, "Welcome to Hayclimb.");
    new name[MAX_PLAYER_NAME+1], string[128];
    GetPlayerName(playerid, name, sizeof (name));
    format (string, sizeof(string), "[TP]: %s has teleported to /hayclimb.", name);
    SendClientMessageToAll (green, string);
    return 1;
}
Reply
#2

Create this..

pawn Код:
new Block[MAX_PLAYERS];
Then in your hayclimb cmd, add :

pawn Код:
Block[playerid] = 1;
And in the HayClimb CMD :

pawn Код:
if(Block[playerid] == 1)
{
    Act[playerid] = 0;
    return 1;
}
And if you want to block antifall in other commands just add a new thing and do the things like what i said..

I'm not sure if this will work but give it a try
Reply
#3

Bump.

The code above me, I have tried but it's not working.
Reply
#4

BUMP, I really need your help.
Reply
#5

change g_antifall to the var you use.
pawn Код:
stock SetPlayerPos2(playerid, Float:X, Float:Y, Float:Z) {
    if (g_antifall[playerid]) {
        g_antifall[playerid] = false;
        SetTimerEx("af_on", 100, false, "i", playerid);
    }
    SetPlayerPos(playerid, X, Y, Z);
    return true;
}

#define SetPlayerPos SetPlayerPos2

forward af_on(playerid);
public af_on(playerid) {
    return  g_antifall[playerid] = true,
            true;
}
add it somewhere in the script, I prefer below the line where you create var's ( I used that on my server )
Reply
#6

Quote:
Originally Posted by greentarch
Посмотреть сообщение
change g_antifall to the var you use.
pawn Код:
stock SetPlayerPos2(playerid, Float:X, Float:Y, Float:Z) {
    if (g_antifall[playerid]) {
        g_antifall[playerid] = false;
        SetTimerEx("af_on", 100, false, "i", playerid);
    }
    SetPlayerPos(playerid, X, Y, Z);
    return true;
}

#define SetPlayerPos SetPlayerPos2

forward af_on(playerid);
public af_on(playerid) {
    return  g_antifall[playerid] = true,
            true;
}
add it somewhere in the script, I prefer below the line where you create var's ( I used that on my server )
It doesn't work.
Reply
#7

You mean, teleport with vehicle?
Reply
#8

No, teleport with vehicle is added, just teleporting to there without exiting vehicle, it works when I disabled antifall, but it has a problem like teleporting back to vehicle after I go somewhere the teleport doesn't support the tp with vehicles.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)