11.02.2011, 20:20
E eu tenho funзгo de desligar veja
Код:
if (strcmp("/ligarmotor", 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; SendClientMessage(playerid, 0xFFFFFFAA, "Motor {2F991A}Ligado. {E31919}Para desligar usa /desligarmotor"); } } } if (strcmp("/desligarmotor", 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; SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado. {2F991A}Para ligar usa /desligarmotor"); } } }