public OnPlayerStateChange(playerid, newstate, oldstate){ if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid, -1, \"Nyomd meg a {FFFF00}SPACE{FFFFFF}-t a jármû beindításához!\"); SetPVarInt(playerid, \"JarmuBeinditas\", 1); } return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if((newkeys & KEY_HANDBRAKE)) { if(GetPVarInt(playerid, \"JarmuBeinditas\")) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid, -1, \"Jármû {FFFF00}beindítva!\"); SendClientMessage(playerid, -1, \"Motor leállítása: {FFFF00}SPACE gomb\"); SetPVarInt(playerid, \"JarmuBeinditas\", 0); } else if(!GetPVarInt(playerid, \"JarmuBeinditas\")) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid, -1, \"Lekapcsoltad a jármû motorját!\"); SendClientMessage(playerid, -1, \"Motor beindítása: {FFFF00}SPACE gomb\"); SetPVarInt(playerid, \"JarmuBeinditas\", 1); } } return 1;}
new vehicleid = GetPlayerVehicleID(playerid);
public OnGameModeInit(){ManualVehicleEngineAndLights();return 1;}public OnPlayerCommandText(playerid, cmdtext[]){return 0;}public OnPlayerStateChange(playerid, newstate, oldstate){ if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) { SendClientMessage(playerid, -1, \"Nyomd meg a {FFFF00}SPACE{FFFFFF}-t a jármû beindításához!\"); SetPVarInt(playerid, \"JarmuBeinditas\", 1); } return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){if((newkeys & KEY_HANDBRAKE)){if(GetPVarInt(playerid, \"JarmuBeinditas\")){ new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid, -1, \"Jármû {FFFF00}beindítva!\"); SendClientMessage(playerid, -1, \"Motor leállítása: {FFFF00}SPACE gomb\"); SetPVarInt(playerid, \"JarmuBeinditas\", 0);}else if(!GetPVarInt(playerid, \"JarmuBeinditas\")){ new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, lights, alarm, doors, bonnet, boot, objective); SendClientMessage(playerid, -1, \"Lekapcsoltad a jármû motorját!\"); SendClientMessage(playerid, -1, \"Motor beindítása: {FFFF00}SPACE gomb\"); SetPVarInt(playerid, \"JarmuBeinditas\", 1);}}return 1;}
Semmit nem egyszerûsítettél le, csak hozzáírtad azt, amit én kihagytam.( ManualVehicleEngineAndLights )