31.03.2014, 17:36
Olб queria que me mandassem uma Funзгo para eu estudar e criar o Comando /speed no server para o carro do player que digitou o comando ficar muito rapido ...
-Obrigado
-Obrigado
CMD:speed(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid))
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 5.0, 0.0);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){//Comandos com Key
//Speed Admin
if (newkeys & KEY_FIRE && StuntSuperSpeed[playerid] == true)
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
ModifyVehicleSpeed(GetPlayerVehicleID(playerid),100);
}
}
//Jump Admin
if (newkeys & KEY_ACTION && StuntSuperSpeed[playerid] == true)
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:Vx,Float:Vy,Float:Vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz);
SetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz+0.20);
}
}
return 1;
}