new motor[MAX_PLAYERS], luz[MAX_PLAYERS], alarme[MAX_PLAYERS], portas[MAX_PLAYERS], capo[MAX_PLAYERS], portamalas[MAX_PLAYERS], objetivo[MAX_PLAYERS]; |
if (strcmp("/motoron", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(motor[playerid] == 0) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob); motor[playerid] = 1; format(string, sizeof(string), " %s estб ligando o veiculo.", PlayerName(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!"); } } } if (strcmp("/motoroff", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(motor[playerid] == 1) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob); motor[playerid] = 0; format(string, sizeof(string), " %s estб desligando o veiculo.", PlayerName(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!"); } } } |
if (strcmp("/motor", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob, carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(motor[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
motor[playerid] = 1;
format(string, sizeof(string), " %s estб ligando o veiculo.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
return 1;
}
if(motor[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
motor[playerid] = 0;
format(string, sizeof(string), " %s estб desligando o veiculo.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!");
}
}
return 1;
}