29.07.2015, 23:26
There is a way to boost the speed for a specific car? Like Elegy...
If its possible, can someone show me how?
Thanks!
If its possible, can someone show me how?
Thanks!
#define HANDLING 1
new HandlingZ[MAX_PLAYERS], Cima, Baixo, Chave;
SetTimer("Handling",250, true);}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/ativar", cmdtext, true, 8) == 0)
{
HandlingZ[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Turbo Ativado");
return true;
}
if (strcmp("/desativar", cmdtext, true, 8) == 0)
{
HandlingZ[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Turbo Desativado");
return true;
}
return false;
}
forward Handling();
public Handling()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(HandlingZ[i] == 1)
{
GetPlayerKeys(i,Chave,Cima,Baixo);
if(Chave &= 8)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new Float:X,Float:Y,Float:Z;
GetVehicleVelocity(GetPlayerVehicleID(i),X,Y,Z);
SetVehicleVelocity(GetPlayerVehicleID(i),X+(X / HANDLING),Y+(Y / HANDLING),Z+(Z / HANDLING));
}
}
}
}
return true;
}
|
Aki O Handling ( quanto menor mais velocidade )
PHP код:
PHP код:
PHP код:
PHP код:
PHP код:
|