need help
#1

does anyone no how to make a script for auto parachute (always have parachute on)
Reply
#2

Erm, nvm
Reply
#3

Under 'OnPlayerUpdate', maybe add:

pawn Код:
public OnPlayerUpdate(playerid)
{
    GivePlayerWeapon(playerid, 46, 1); //Parachute
    return 1;
}
Reply
#4

@ExeC, that will kill the player if he jumps off a building and turns the parachute on.
Reply
#5

Ah, yea.

Under 'OnPlayerConnect', add:

pawn Код:
SetTimerEx("PCheck", 3000, 1, "i", playerid);
Then, at the bottom of your gamemode,

pawn Код:
forward PCheck(playerid);
public PCheck(playerid)
{
    if(GetPlayerWeapon(playerid) >= 46)
    {
        return 0;
    }
    else
    {
        GivePlayerWeapon(playerid, 46, 1);
    }
    return 1;
}
Reply
#6

In case it should be
pawn Код:
if(GetPlayerWeapon(playerid) != 46)
Reply
#7

pawn Код:
new tmpanim[10];
public OnPlayerUpdate(playerid)
{
    GetAnimationName(GetPlayerAnimationIndex(playerid),tmpanim,10,tmpanim,10);
    if(!strcmp(tmpanim,"FALL",true,4))
    {
        if(GetPlayerWeapon(playerid)!=46)GivePlayerWeapon(playerid,46,1);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)