Auto Anti fall off Bike
#1

Anyone know Auto Antifall off bike. That automatically put's you in your current bike when you fell?
Reply
#2

OnPlayerStateChange is your friend on this one. Just check if vehicle id was bike and put player back on it

`e: ▼ Help! I'm stuck in recursive loop
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=373805
Reply
#4

thanks misiur but how do I make commands for /antifall - toggle on/off
Reply
#5

pawn Code:
new mode = 0;
CMD:antifall(playerid, params[]) {
    mode = !mode;
    return SendClientMessage(playerid, -1, "Toggled");
}

public OnPlayerStateChange(playerid, newstate, oldstate) {
    if(oldstate == PLAYER_STATE_DRIVER && wasOnBike && mode) {
        //PutPlayerInVehicle
    }
}
You have to implement the wasOnBike and putplayerinvehicle yourself. Have fun
Reply
#6

Quote:
Originally Posted by HuSs3n
View Post
lol sorry i copied a wrong thread
this , https://sampforum.blast.hk/showthread.php?tid=33245
Reply
#7

good
Reply
#8

Quote:
Originally Posted by HuSs3n
View Post
lol sorry i copied a wrong thread
this , https://sampforum.blast.hk/showthread.php?tid=33245
It's okay I appreciate your help. I have already tried this but nothing happens. Need to convert it to zcmd.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)