Stunts Bonus - 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)
+--- Thread: Stunts Bonus (
/showthread.php?tid=529818)
Stunts Bonus -
Sarra - 04.08.2014
Hi , when someone does an "Insane Stunt" gets some cash,
How do I disable that?
Respuesta: Stunts Bonus -
EduGTA - 04.08.2014
Use EnableStuntBonusForAll.
pawn Код:
EnableStuntBonusForAll(enable);
enable - 1 to enable the bonus, 0 to disable them.
This function can be placed in OnGameModeInit.
Code example:
pawn Код:
public OnGameModeInit()
{
EnableStuntBonusForAll(0); //This will disable all stunt bonus.
return 1;
}
EDIT: You can also use EnableStuntBonusForPlayer, which is the same, but it will only affect one player.
pawn Код:
EnableStuntBonusForAll(playerid, enable);
playerid - The player's ID that will be affected.
enable - 1 to enable stunt bonus for that player, or 0 to disable them.
Code example:
pawn Код:
public OnPlayerConnect(playerid)
{
EnableStuntBonusForPlayer(playerid, 0); // Disable stunt bonuses when the player connects to the server.
}
Re: Stunts Bonus -
Sarra - 04.08.2014
I'll rep you as soon as I read this and apply it (a little busy atm)
----------------
thanks alot, works I'll rep+ you as soon as I can, gave too much reps today