19.10.2012, 00:16
PHP код:
public Autocruise(playerid, in){new Float:vehx, Float:vehy, Float:vehz;GetVehiclePos(GetPlayerVehicleID(playerid), vehx, vehy, vehz);
if(in == 1){if(-1777 < vehy){for(new i = 0; i <= MAX_PLAYERS; i++){if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)){SetPlayerCameraPos(i,1910.4637,-1771.8,15);SetPlayerCameraLookAt(i,1911.2863,-1775.1614,13.3828);}}SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);TogglePlayerControllable(playerid, 0);MoveObject(PortaoEntrada, 1911.21130371, -1780.68151855, 14.15972233, 1);SetTimerEx("AguaLava",4000,0,"ii",playerid, 1);}
else{if(vehx != 1911.1886){SetVehiclePos(GetPlayerVehicleID(playerid), 1911.1886, vehy, vehz);SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);}TogglePlayerControllable(playerid, 1);SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0.1, 0);SetTimerEx("Autocruise",100,0,"ii",playerid, 1);}}
else{if(-1768 < vehy){SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);TogglePlayerControllable(playerid, 0);MoveObject(PortaoSaida, 1911.21130371,-1771.97814941,14.15972233, 1);SetTimerEx("EndWash",1000,0,"i",playerid);}
else{if(vehx != 1911.1886){SetVehiclePos(GetPlayerVehicleID(playerid), 1911.1886, vehy, vehz);SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);}TogglePlayerControllable(playerid, 1);SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0.1, 0);
SetTimerEx("Autocruise",100,0,"ii",playerid, 0);}}return true;}
public AguaLava(playerid, on){if(on == 0){for(new i = 0; i <= MAX_PLAYERS; i++){if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)){DestroyPlayerObject(i, AguaLava1);DestroyPlayerObject(i, AguaLava2);DestroyPlayerObject(i, AguaLava3);DestroyPlayerObject(i, AguaLava4);DestroyPlayerObject(i, AguaLava5);DestroyPlayerObject(i, AguaLava6);DestroyPlayerObject(i, AguaLava7);
RepairVehicle(GetPlayerVehicleID(playerid));SetTimerEx("AbrirSaida",500,0,"i",playerid);}}}
else{for(new i = 0; i <= MAX_PLAYERS; i++){if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)){AguaLava1 = CreatePlayerObject(i, 18747, 1911, -1776, 10, 0, 0, 90);AguaLava2 = CreatePlayerObject(i, 18747, 1914, -1776, 10, 0, 0, 90);AguaLava3 = CreatePlayerObject(i, 18739, 1910.1821, -1777.8997, 25, 0, 180, 0);AguaLava4 = CreatePlayerObject(i, 18739, 1910.1821, -1774.8132, 25, 0, 180, 0);
AguaLava5 = CreatePlayerObject(i, 18739, 1912.1490, -1774.8132, 25, 0, 180, 0);AguaLava6 = CreatePlayerObject(i, 18739, 1912.1490, -1777.8997, 25, 0, 180, 0);AguaLava7 = CreatePlayerObject(i, 18739, 1911.2194, -1776.5117, 25, 0, 180, 0);SetTimerEx("AguaLava",15000,0,"ii",playerid, 0);}}}return true;}
public AbrirSaida(playerid){for(new i = 0; i <= MAX_PLAYERS; i++){if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)){SetPlayerCameraPos(i,1909.0697,-1760.7429,15);SetPlayerCameraLookAt(i,1911.2600,-1771.5955,13.3828);}}MoveObject(PortaoSaida, 1911.21130371, -1771.97814941, 10.50000000, 1);SetTimerEx("Autocruise",3500,0,"ii",playerid, 0);return true;}
public EndWash(playerid){for(new i = 0; i <= MAX_PLAYERS; i++){if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)){TogglePlayerControllable(i, 1);SetCameraBehindPlayer(i);}}usandolavacarro = -1;Update3DTextLabelText(textoentrada, COR_AZULZAO, "Ninguйm estб usando o Lava Rбpido agora, o preзo й de R$ 20,00\n(/lavarcarro)");return true;}