19.06.2011, 17:47
Fiz um aqui com base naquele seu FS...
No topo:
Agora o comando:
Agora no fim do GM:
No topo:
PHP код:
forward TurboOn(playerid);
new StopTurbo[MAX_PLAYERS];
PHP код:
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;
}
PHP код:
public TurboOn(playerid)
{
new Float:Pos[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid),Pos[0],Pos[1],Pos[2]);
SetVehicleVelocity(GetPlayerVehicleID(playerid),Pos[0]+(Pos[0]),Pos[1]+(Pos[1]),Pos[2]+(Pos[2]));
}