need help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: need help (
/showthread.php?tid=212858)
need help -
chavaias - 18.01.2011
does anyone no how to make a script for auto parachute (always have parachute on)
Re: need help - [L3th4l] - 18.01.2011
Erm, nvm
Re: need help -
ExeC - 18.01.2011
Under 'OnPlayerUpdate', maybe add:
pawn Код:
public OnPlayerUpdate(playerid)
{
GivePlayerWeapon(playerid, 46, 1); //Parachute
return 1;
}
Re: need help -
Retardedwolf - 18.01.2011
@ExeC, that will kill the player if he jumps off a building and turns the parachute on.
Re: need help -
ExeC - 18.01.2011
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;
}
Re: need help -
Not available - 18.01.2011
In case it should be
pawn Код:
if(GetPlayerWeapon(playerid) != 46)
Re: need help -
Joe Staff - 18.01.2011
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;
}