27.06.2014, 21:18
Como colocar para algums Carro nгo desligar ?
PHP код:
if (strcmp("/motoron", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
new modeloo = GetVehicleModel(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
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;
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s liga o motor do veнculo.", sendername);
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
}
}
if (strcmp("/motoroff", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
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;
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s desliga o motor do veнculo.", sendername);
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
}
}