27.04.2015, 23:27
Quote:
Vocк troca sua variavel motor[MAX_PLAYERS] por new bool:motor[MAX_VEHICLES];
No OnVehicleSpawn vocк coloca: Код:
motor[vehicleid] = false; SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0); Код:
if(strcmp("/motor",cmdtext,true,6)==0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_AVISO,"Vocк precisa estar em um veнculo!"); new carro = GetPlayerVehicleID(playerid); new vid = GetPlayerVehicleID(playerid); if(Gas[vid] == 0) return SendClientMessage(playerid,COLOR_GRAD2," Veiculo sem Combustivel"); if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_AVISO," Vocк nгo й o motorista do carro !"); if(carro != INVALID_VEHICLE_ID) { if(motor[carro]) { SetVehicleParamsEx(carro, 0, 0, 0, 0, 0, 0, 0); SendClientMessage(playerid, COLOR_BRANCOM, "Motor do veiculo desligado"); motor[carro] = false; } else { SetVehicleParamsEx(carro, 1, 0, 0, 0, 0, 0, 0); SendClientMessage(playerid, COLOR_BRANCOM, "Motor do veiculo desligado"); motor[carro] = true; } } return 1; } |