[Ajuda]Turbo RPG
#4

e eu jogo bnl eu vi la mais ja vi em outros servidor
Tureto vo te passar o sistema
Quote:

#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;
}

Pode ser essa ou
Quote:

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]));
}

Caso prefira link:https://sampforum.blast.hk/showthread.php?tid=262399
Reply


Messages In This Thread
[Ajuda]Turbo RPG - by wevertonneves - 29.10.2011, 13:07
Re: {AJUDA]Turbo RPG - by [Dk]TuReTOo - 29.10.2011, 13:13
Re: {AJUDA]Turbo RPG - by Colgate - 29.10.2011, 13:19
Re: {AJUDA]Turbo RPG - by wevertonneves - 29.10.2011, 14:20
Re: {AJUDA]Turbo RPG - by Kuddy - 29.10.2011, 15:42
Re: {AJUDA]Turbo RPG - by wevertonneves - 29.10.2011, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)