SA-MP Forums Archive
Stunts Points - 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: Stunts Points (/showthread.php?tid=143833)



Stunts Points - -PunisheR- - 24.04.2010

Hey all,

In almost stunt servers, there is a stunt points counter.
I don't really how it is done, someone can help me?
* I mean when someone Jump's with a vehicle, he get's a point.
I don't need the point system, only a way to check when someone jump's.

Thanks.



Re: Stunts Points - shady91 - 24.04.2010

just make like a 1 second time that keeps running and the do the jump when your in the spot that they must past to get the point save the location use isplayerinrangeofpoint radius like 4 and the position, I was going to do something like this but I closed the stunt server down, you might need to make the timer smaller then 1 second though it's up to you.


Re: Stunts Points - -PunisheR- - 24.04.2010

Didn't get it ;[
can you give me an example?



Re: Stunts Points - shady91 - 24.04.2010

pawn Код:
public OnGameModeInit()
{
    SetTimer("CheckStunt", 700, 1);

return 1;
}

public CheckStunt()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsPlayerInRangeOfPoint(i, 4.0, /*the position of were they must pass to get the stunt point*/)) SetPVarInt(i, "StuntPoint", GetPVarInt(i, "StuntPoint") +1);// example 1
    if(IsPlayerInRangeOfPoint(i, 4.0, /*the position of were they must pass to get the stunt point*/)) SetPVarInt(i, "StuntPoint", GetPVarInt(i, "StuntPoint") +1);// example 2 and so on
    }
    }
return 1;
}
You could do it like that.


Re: Stunts Points - shady91 - 24.04.2010

the indentation is messy because of the way the forum displays it you must neaten it up.