Is this possible?
#1

Well, My question is if it is possible to detect the stamina for example running and swimming like in single player?
So if you got low stamina and havent trained it you can't run fast as long as someone who have trained his stamina. Is this possible?
Reply
#2

No not yet x) Hopefully for the next SA:MP update.
Reply
#3

Aight, Would be cool though!
Reply
#4

You could try with some other functions.

Quote:

stock GetPlayerSpeed(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
return floatround(ST[3]);
}

-Credits MB
Reply
#5

Quote:
Originally Posted by CrazyChoco
Посмотреть сообщение
You could try with some other functions.

-Credits MB
Thanks but I was just wondering
Reply
#6

You could use the above given stock to get the speed on a regular basis, save it somewhere, check using gettickcount the time passed and set your own stamina allowance. If it exceeds a particular value for some (max sprint allow time), set the velocity to (player - velocity) - 1 or 0!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)