[Ajuda] Como?
#9

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Se jб tб usando float, o problema deve ser o cбlculo, nгo?
Olha so
pawn Код:
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)) * 100.3;
    return floatround(ST[3]);
}
Onde ele pega e seta
pawn Код:
SendClientMessage(playerid,-1,"Controlador de velocidade ativado");
         Check[playerid] = SetTimerEx("Atuavelo", 100, true, "i", playerid);
         Media[playerid] = GetPlayerSpeed(playerid);
         format(Don,sizeof(Don),"Sua velocidade esta travada na media de  %i .", GetPlayerSpeed(playerid));
         SendClientMessage(playerid,-1,Don);
         format(Don,sizeof(Don),"Media ficou  %i .", Media[playerid]);
         SendClientMessage(playerid,-1,Don);
A media na msg tmb mostra bem escrotao :S

Variavel media
pawn Код:
new Float:Media[MAX_PLAYERS];
Reply


Messages In This Thread
Como? - by Don_Speed - 06.11.2012, 13:00
Re: Como? - by [JD]BlackFire - 06.11.2012, 13:05
Re: Como? - by AmericanStyle'™ - 06.11.2012, 13:06
Re: Como? - by Don_Speed - 06.11.2012, 14:30
Re: Como? - by Rodney Francalim - 06.11.2012, 14:43
Re: Como? - by Don_Speed - 06.11.2012, 14:51
Re: Como? - by ViniBorn - 06.11.2012, 14:52
Re: Como? - by Rodney Francalim - 06.11.2012, 14:52
Re: Como? - by Don_Speed - 06.11.2012, 14:57
Re: Como? - by Rodney Francalim - 06.11.2012, 15:32

Forum Jump:


Users browsing this thread: 1 Guest(s)