#include <a_samp> #define FILTERSCRIPT #define HANDLING 1 // Aki O Handling ( quanto menor mais velocidade ) new HandlingZ[MAX_PLAYERS], Cima, Baixo, Chave; public OnFilterScriptInit() { print("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"); print("|- Ultra Turbo By: TiagoPS -|"); print("|-+-+-+-+ Carregado +-+-+-+-|"); print("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"); SetTimer("Handling",250, true); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/TurboON", cmdtext, true, == 0) { HandlingZ[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFAA, "Turbo Ativado"); return true; } if (strcmp("/TurboOFF", cmdtext, true, == 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 &= { 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; } |
forward TurboOn(playerid); new StopTurbo[MAX_PLAYERS]; CMD:turboon(playerid,params[]) { StopTurbo[playerid] = SetTimerEx("TurboOn",3000,true,"i",playerid); SendClientMessage(playerid,0xF6F6F6AA,"Vocк ativou o turbo"); SendClientMessage(playerid,0xF6F6F6AA,"Para desativar use /TurboOff"); return true; } CMD:turbooff(playerid,params[]) { KillTimer(StopTurbo[playerid]); SendClientMessage(playerid,0xF6F6F6AA,"Vocк desativou o turbo"); return true; } public TurboOn(playerid) { new Float:Pos[3]; GetVehicleVelocity(GetPlayerVehicleID(playerid),Po s[0],Pos[1],Pos[2]); SetVehicleVelocity(GetPlayerVehicleID(playerid),Po s[0]+(Pos[0]),Pos[1]+(Pos[1]),Pos[2]+(Pos[2])); } |
#include <a_samp>
new bool:TemTurbo[MAX_PLAYERS];
#define FILTERSCRIPT
#define HANDLING 1 // Aki O Handling ( quanto menor mais velocidade )
new HandlingZ[MAX_PLAYERS], Cima, Baixo, Chave;
public OnFilterScriptInit()
{
print("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
print("|- Ultra Turbo By: TiagoPS -|");
print("|-+-+-+-+ Carregado +-+-+-+-|");
print("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
SetTimer("Handling",250, true);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/TurboON", cmdtext, true, 8) == 0)
{
if(TemTurbo[playerid])
{
HandlingZ[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Turbo Ativado");
}
else if(!TemTurbo[playerid]) return SendClientMessage(playerid, -1, "Vocк nгo tem um turbo! Digite {FF0000}/ComprarTurbo{FFFFFF} para comprar um!");
return 1;
}
if (strcmp("/TurboOFF", cmdtext, true, 8) == 0)
{
if(TemTurbo[playerid])
{
HandlingZ[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Turbo Desativado");
}
else if(!TemTurbo[playerid]) return SendClientMessage(playerid, -1, "Vocк nгo tem um turbo! Digite {FF0000}/ComprarTurbo{FFFFFF} para comprar um!");
return 1;
}
if (strcmp("/ComprarTurbo", cmdtext, true, 8) == 0)
{
if(TemTurbo[playerid]) return SendClientMessage(playerid, -1, "Vocк jб tem um turbo");
if(!TemTurbo[playerid])
{
TemTurbo[playerid] = true;
SendClientMessage(playerid, 0xFFFFFFAA, "Vocк Comprou um turbo!");
}
return 1;
}
if (strcmp("/VenderTurbo", cmdtext, true, 8) == 0)
{
if(!TemTurbo[playerid]) return SendClientMessage(playerid, -1, "Vocк nгo tem um turbo!");
if(TemTurbo[playerid])
{
TemTurbo[playerid] = false;
SendClientMessage(playerid, 0xFFFFFFAA, "Vocк vendeu seu turbo.");
}
return 1;
}
return false;
}
public OnPlayerDisconnect(playerid, reason)
{
TemTurbo[playerid] = false;
return 1;
}
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;
}