SA-MP Forums Archive
Pregunta Duda - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Pregunta Duda (/showthread.php?tid=241045)



Pregunta Duda - AnGeeeL - 17.03.2011

Hola hace mucho no entraba aca xD

Bueno mi pregunta seria їComo le podria hacer para cuando estes un auto y presiones W + ALT el auto Patine (Queme llanta pero bien rapido como en la vida real xd) pero que el auto vaya avansando ala ves ?


Re: Pregunta Duda - murdoxix - 17.03.2011

Pero el W + BarraEspaciadora hace eso! o el W + S, no me acuerdo :P


Re: Pregunta Duda - AnGeeeL - 17.03.2011

pero quiero que patine mas tiempo y aparte avansando al precionar eso patine yase que se ase eso con W+S pero vayas avansando y piques un numero o algo y patine machin bien rapido y potentemente XD


Respuesta: Pregunta Duda - leaNN! - 17.03.2011

Utiliza OnPlayerKeyStateChange, IsPlayerInAnyVehicle, y SetVehicleVelocity, eso es lo mejor que se me ocurre.

pawn Код:
stock Velocidad(playerid, Float:velocidad)
{
    new Float: X, Float: Y, Float: Z, Float: ROT;
    new Float: FX, Float: FY, Float: FZ;
    GetPlayerVelocity(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, ROT);
    FX = X+floatsin(-ROT, degrees)*velocidad;
    FY = Y+floatcos(-ROT, degrees)*velocidad;
    FZ = (Z*velocidad)*2;
    SetPlayerVelocity(playerid, FX, FY, FZ);
    return 1;
}
Ahi tenes, a eso lo usas asi:
pawn Код:
Velocidad(playerid, 2.5);
Eso es un ejemplo, 2.5 lo cambias por lo que vos quieras.


Re: Pregunta Duda - AnGeeeL - 17.03.2011

no me podrias dar un ejemplo de como hacerlo pa darme una idea we


Re: Pregunta Duda - AnGeeeL - 23.03.2011

Ya lo probe pero no hace lo que quiero que aga