SA-MP Forums Archive
How can i make that Stunting gives score? - 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: How can i make that Stunting gives score? (/showthread.php?tid=280086)



How can i make that Stunting gives score? - Sensitive - 30.08.2011

How can i do that.. If i stunt, i will get like 3+ score for that. And i want score to save to. I use LuxAdmin.


Re: How can i make that Stunting gives score? - =WoR=Varth - 30.08.2011

There's no OnPlayerStunt callback.
I think you can detect it by check player's velocity, use timer and if they earn money, that's mean they're stunting.


Re: How can i make that Stunting gives score? - [MWR]Blood - 30.08.2011

Or, you can just use this
https://sampwiki.blast.hk/wiki/EnableStuntBonusForAll
It is going to give you only money, though.


Re: How can i make that Stunting gives score? - IceCube! - 30.08.2011

What if you used

A timer and GetPlayerVelocity(blabla);

and if he gets higher give him a point?

This might not be so good if you have a boost thing to make plyers fly into the air and can be abused by planes

so youd have to single planes out

EDIT: ignore the above Im a noob what if he climbs a hill?


Re: How can i make that Stunting gives score? - =WoR=Varth - 30.08.2011

Quote:
Originally Posted by varthshenon
View Post
There's no OnPlayerStunt callback.
I think you can detect it by check player's velocity, use timer and if they earn money, that's mean they're stunting.
Quote:
Originally Posted by IceCube!
View Post
What if you used

A timer and GetPlayerVelocity(blabla);

and if he gets higher give him a point?

This might not be so good if you have a boost thing to make plyers fly into the air and can be abused by planes

so youd have to single planes out

EDIT: ignore the above Im a noob what if he climbs a hill?
Oh my gosh.


Re: How can i make that Stunting gives score? - Improvement™ - 30.08.2011

Well... you could set the player's score to the ammount of money that they have.. Once you do a few stunts, and suddenly you will recieve money.. Then automaticly after that the player's score will be set to the total ammount of money. This is what most Stunting Servers has but it does work..

Example:
pawn Code:
OnPlayerUpdate(playerid)
{
    SetPlayerScore(playerid, GetPlayerMoney(playerid));
}